Browse files

avoid invalid assumption that the Superglobals are always arrays

  • Loading branch information...
1 parent 6e92411 commit a8e5396fda40c1994190691271fe81bce1c8f0c6 @scoates scoates committed with Apr 23, 2010
Showing with 1 addition and 0 deletions.
  1. +1 −0 PHPUnit/Util/GlobalState.php
View
1 PHPUnit/Util/GlobalState.php
@@ -163,6 +163,7 @@ protected static function backupSuperGlobalArray($superGlobalArray)
protected static function restoreSuperGlobalArray($superGlobalArray)
{
if (isset($GLOBALS[$superGlobalArray]) &&
+ is_array($GLOBALS[$superGlobalArray]) &&
isset(self::$globals[$superGlobalArray])) {
$keys = array_keys(
array_merge(

0 comments on commit a8e5396

Please sign in to comment.