Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/medad.corals.io/vendor/predis/predis/tests/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/medad.corals.io/vendor/predis/predis/tests/phpunit_php81.patch
diff --git a/src/Util/Configuration.php b/src/Util/Configuration.php
index b2f7a7bd0c6..1a1a444d378 100644
--- a/src/Util/Configuration.php
+++ b/src/Util/Configuration.php
@@ -514,22 +514,17 @@ public function handlePHPConfiguration()
 
         foreach (array('var', 'post', 'get', 'cookie', 'server', 'files', 'request') as $array) {
             // See https://github.com/sebastianbergmann/phpunit/issues/277
-            switch ($array) {
-                case 'var':
-                    $target = &$GLOBALS;
-                    break;
-
-                case 'server':
-                    $target = &$_SERVER;
-                    break;
-
-                default:
-                    $target = &$GLOBALS['_' . strtoupper($array)];
-                    break;
-            }
-
             foreach ($configuration[$array] as $name => $value) {
-                $target[$name] = $value;
+                switch ($array) {
+                    case 'var':
+                        $GLOBALS[$name] = $value;
+                        break;
+                    case 'server':
+                        $_SERVER[$name] = $value;
+                        break;
+                    default:
+                        $GLOBALS['_' . strtoupper($array)][$name] = $value;
+                }
             }
         }
 
diff --git a/src/Util/Getopt.php b/src/Util/Getopt.php
index 370e97d73f8..5bd8553970b 100644
--- a/src/Util/Getopt.php
+++ b/src/Util/Getopt.php
@@ -144,7 +144,7 @@ protected static function parseLongOption($arg, $long_options, &$opts, &$args)
 
             if (substr($long_opt, -1) == '=') {
                 if (substr($long_opt, -2) != '==') {
-                    if (!strlen($opt_arg)) {
+                    if (null === $opt_arg || strlen($opt_arg) < 1) {
                         $opt_arg = current($args);
                         next($args);
                         if (!($opt_arg)) {

Spamworldpro Mini