From 77331aed277d30b84993c035a8b72e6c87a7cb67 Mon Sep 17 00:00:00 2001 From: "Eloy Lafuente (stronk7)" Date: Sun, 14 Oct 2018 13:25:37 +0200 Subject: [PATCH] MDL-63422 lib: horde - review core loop / switch / case / continue --- lib/horde/framework/Horde/Imap/Client/Tokenize.php | 2 +- lib/horde/framework/Horde/Mail/Rfc822.php | 6 +++--- lib/horde/readme_moodle.txt | 3 +++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/horde/framework/Horde/Imap/Client/Tokenize.php b/lib/horde/framework/Horde/Imap/Client/Tokenize.php index 2a2baca2a5a..99cc0930bd3 100644 --- a/lib/horde/framework/Horde/Imap/Client/Tokenize.php +++ b/lib/horde/framework/Horde/Imap/Client/Tokenize.php @@ -295,7 +295,7 @@ class Horde_Imap_Client_Tokenize implements Iterator // identifier. $binary = true; $text .= $c; - continue; + break; case '{': if ($binary) { diff --git a/lib/horde/framework/Horde/Mail/Rfc822.php b/lib/horde/framework/Horde/Mail/Rfc822.php index 346313bea1e..65cd730c767 100644 --- a/lib/horde/framework/Horde/Mail/Rfc822.php +++ b/lib/horde/framework/Horde/Mail/Rfc822.php @@ -571,7 +571,7 @@ class Horde_Mail_Rfc822 if (substr($str, -1) == "\r") { $str = substr($str, 0, -1); } - continue; + break; case '\\': if (($chr = $this->_curr(true)) === false) { @@ -737,7 +737,7 @@ class Horde_Mail_Rfc822 case "\r": case "\t": ++$this->_ptr; - continue; + break; case '(': $this->_rfc822SkipComment(); @@ -765,7 +765,7 @@ class Horde_Mail_Rfc822 switch ($chr) { case '(': ++$level; - continue; + break; case ')': if (--$level == 0) { diff --git a/lib/horde/readme_moodle.txt b/lib/horde/readme_moodle.txt index 2987291c9d0..add93adb8e4 100644 --- a/lib/horde/readme_moodle.txt +++ b/lib/horde/readme_moodle.txt @@ -8,6 +8,9 @@ Description of import of Horde libraries # Copy the following script and store it on /tmp, change it's execute bit, and run it, passing in your path to Horde (the directory you've cloned the repository): /tmp/copyhorde.sh ~/git/ext/horde/ +# Verify that these patches have been applied in the imported version. Apply them locally if not: + - https://github.com/horde/Mail/pull/1 (Mail component). + - https://github.com/horde/Imap_Client/pull/6 (IMAP Client component). ==== #!/bin/sh -- 2.43.0