Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 678022 Details for
Bug 759445
dev-php/phpunit-5.7.15-r3: Call to undefined function each
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
phpunit-5.7-noeach.patch
phpunit-5.7-noeach.patch (text/plain), 2.75 KB, created by
Brian Evans (RETIRED)
on 2020-12-11 21:09:29 UTC
(
hide
)
Description:
phpunit-5.7-noeach.patch
Filename:
MIME Type:
Creator:
Brian Evans (RETIRED)
Created:
2020-12-11 21:09:29 UTC
Size:
2.75 KB
patch
obsolete
>diff -aurN a/src/Util/Getopt.php b/src/Util/Getopt.php >--- a/src/Util/Getopt.php 2017-03-02 10:22:43.000000000 -0500 >+++ b/src/Util/Getopt.php 2020-12-11 16:01:30.353199983 -0500 >@@ -34,7 +34,10 @@ > > reset($args); > >- while (list($i, $arg) = @each($args)) { >+ while(false !== $arg = current($args)) { >+ $i = key($args); >+ next($args); >+ > if ($arg == '') { > continue; > } >@@ -75,28 +78,27 @@ > $opt = $arg[$i]; > $opt_arg = null; > >- if (($spec = strstr($short_options, $opt)) === false || $arg[$i] == ':') { >+ if ($arg[$i] === ':' || ($spec = strstr($short_options, $opt)) === false) { > throw new PHPUnit_Framework_Exception( >- "unrecognized option -- $opt" >+ "unrecognized option -- {$opt}" > ); > } > >- if (strlen($spec) > 1 && $spec[1] == ':') { >- if (strlen($spec) > 2 && $spec[2] == ':') { >- if ($i + 1 < $argLen) { >- $opts[] = [$opt, substr($arg, $i + 1)]; >- break; >- } >- } else { >- if ($i + 1 < $argLen) { >- $opts[] = [$opt, substr($arg, $i + 1)]; >- break; >- } elseif (list(, $opt_arg) = @each($args)) { >- } else { >+ if (strlen($spec) > 1 && $spec[1] === ':') { >+ if ($i + 1 < $argLen) { >+ $opts[] = [$opt, substr($arg, $i + 1)]; >+ >+ break; >+ } >+ >+ if (!(strlen($spec) > 2 && $spec[2] === ':')) { >+ if (false === $opt_arg = current($args)) { > throw new PHPUnit_Framework_Exception( >- "option requires an argument -- $opt" >+ "option requires an argument -- {$opt}" > ); > } >+ >+ next($args); > } > } > >@@ -135,12 +137,14 @@ > } > > if (substr($long_opt, -1) == '=') { >- if (substr($long_opt, -2) != '==') { >- if (!strlen($opt_arg) && !(list(, $opt_arg) = @each($args))) { >+ if (substr($long_opt, -2) != '==' && !strlen($opt_arg)) { >+ if (false === $opt_arg = current($args)) { > throw new PHPUnit_Framework_Exception( > "option --$opt requires an argument" > ); > } >+ >+ next($args); > } > } elseif ($opt_arg) { > throw new PHPUnit_Framework_Exception(
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 759445
:
677809
| 678022