Created
March 5, 2014 20:18
-
-
Save lolli42/9375718 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Composer/vendor/phpunit/phpunit/PHPUnit/Util/GlobalState.php b/Composer/vendor/phpunit/phpunit/PHPUnit/Util/GlobalState.php | |
index 2737985..baba04e 100644 | |
--- a/Composer/vendor/phpunit/phpunit/PHPUnit/Util/GlobalState.php | |
+++ b/Composer/vendor/phpunit/phpunit/PHPUnit/Util/GlobalState.php | |
@@ -112,7 +112,7 @@ public static function backupGlobals(array $blacklist) | |
!in_array($key, $superGlobalArrays) && | |
!in_array($key, $blacklist) && | |
!$GLOBALS[$key] instanceof Closure) { | |
- self::$globals['GLOBALS'][$key] = serialize($GLOBALS[$key]); | |
+ self::$globals['GLOBALS'][$key] = $GLOBALS[$key]; | |
} | |
} | |
} | |
@@ -138,16 +138,12 @@ public static function restoreGlobals(array $blacklist) | |
!in_array($key, $superGlobalArrays) && | |
!in_array($key, $blacklist)) { | |
if (isset(self::$globals['GLOBALS'][$key])) { | |
- $GLOBALS[$key] = unserialize( | |
- self::$globals['GLOBALS'][$key] | |
- ); | |
+ $GLOBALS[$key] = self::$globals['GLOBALS'][$key]; | |
} else { | |
unset($GLOBALS[$key]); | |
} | |
} | |
} | |
- | |
- self::$globals = array(); | |
} | |
protected static function backupSuperGlobalArray($superGlobalArray) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Meanwhile, this hack is obsolete for TYPO3 CMS core. We drastically reduced unit test bootstrap and the globals are much smaller now.