MDL-63422 lib: horde - review core loop / switch / case / continue
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Sun, 14 Oct 2018 11:25:37 +0000 (13:25 +0200)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Tue, 30 Oct 2018 23:17:59 +0000 (00:17 +0100)
lib/horde/framework/Horde/Imap/Client/Tokenize.php
lib/horde/framework/Horde/Mail/Rfc822.php
lib/horde/readme_moodle.txt

index 2a2baca..99cc093 100644 (file)
@@ -295,7 +295,7 @@ class Horde_Imap_Client_Tokenize implements Iterator
                         // identifier.
                         $binary = true;
                         $text .= $c;
                         // identifier.
                         $binary = true;
                         $text .= $c;
-                        continue;
+                        break;
 
                     case '{':
                         if ($binary) {
 
                     case '{':
                         if ($binary) {
index 346313b..65cd730 100644 (file)
@@ -571,7 +571,7 @@ class Horde_Mail_Rfc822
                 if (substr($str, -1) == "\r") {
                     $str = substr($str, 0, -1);
                 }
                 if (substr($str, -1) == "\r") {
                     $str = substr($str, 0, -1);
                 }
-                continue;
+                break;
 
             case '\\':
                 if (($chr = $this->_curr(true)) === false) {
 
             case '\\':
                 if (($chr = $this->_curr(true)) === false) {
@@ -737,7 +737,7 @@ class Horde_Mail_Rfc822
             case "\r":
             case "\t":
                 ++$this->_ptr;
             case "\r":
             case "\t":
                 ++$this->_ptr;
-                continue;
+                break;
 
             case '(':
                 $this->_rfc822SkipComment();
 
             case '(':
                 $this->_rfc822SkipComment();
@@ -765,7 +765,7 @@ class Horde_Mail_Rfc822
             switch ($chr) {
             case '(':
                 ++$level;
             switch ($chr) {
             case '(':
                 ++$level;
-                continue;
+                break;
 
             case ')':
                 if (--$level == 0) {
 
             case ')':
                 if (--$level == 0) {
index 2987291..add93ad 100644 (file)
@@ -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/
 # 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
 
 ====
 #!/bin/sh