����JFIF��x�x����'
Server IP : 78.140.185.180 / Your IP : 18.218.161.96 Web Server : LiteSpeed System : Linux cpanel13.v.fozzy.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64 User : builderbox ( 1072) PHP Version : 7.3.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/builderbox/www/vendor/predis/predis/tests/ |
Upload File : |
diff --git a/src/Util/Getopt.php b/src/Util/Getopt.php index ba21be3..96931a3 100644 --- a/src/Util/Getopt.php +++ b/src/Util/Getopt.php @@ -35,7 +35,15 @@ class PHPUnit_Util_Getopt reset($args); array_map('trim', $args); - while (list($i, $arg) = each($args)) { + while (true) { + $arg = current($args); + $i = key($args); + next($args); + + if ($arg === false) { + break; + } + if ($arg == '') { continue; } @@ -94,11 +102,14 @@ class PHPUnit_Util_Getopt if ($i + 1 < $argLen) { $opts[] = array($opt, substr($arg, $i + 1)); break; - } elseif (list(, $opt_arg) = each($args)) { } else { - throw new PHPUnit_Framework_Exception( - "option requires an argument -- $opt" - ); + $opt_arg = current($args); + next($args); + if ($opt_arg === false) { + throw new PHPUnit_Framework_Exception( + "option requires an argument -- $opt" + ); + } } } } @@ -139,11 +150,14 @@ class PHPUnit_Util_Getopt if (substr($long_opt, -1) == '=') { if (substr($long_opt, -2) != '==') { - if (!strlen($opt_arg) && - !(list(, $opt_arg) = each($args))) { - throw new PHPUnit_Framework_Exception( - "option --$opt requires an argument" - ); + if (!strlen($opt_arg)) { + $opt_arg = current($args); + next($args); + if ($opt_arg === false) { + throw new PHPUnit_Framework_Exception( + "option --$opt requires an argument" + ); + } } } } elseif ($opt_arg) {