-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In the interest of avoiding side-effects during dumping, I'm replacing the value with a <constant ast> string instead of performing an update constant operation.
- Loading branch information
Showing
3 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--TEST-- | ||
Bug #79778: Assertion failure if dumping closure with unresolved static variable | ||
--FILE-- | ||
<?php | ||
$closure1 = function() { | ||
static $var = CONST_REF; | ||
}; | ||
var_dump($closure1); | ||
print_r($closure1); | ||
?> | ||
--EXPECT-- | ||
object(Closure)#1 (1) { | ||
["static"]=> | ||
array(1) { | ||
["var"]=> | ||
string(14) "<constant ast>" | ||
} | ||
} | ||
Closure Object | ||
( | ||
[static] => Array | ||
( | ||
[var] => <constant ast> | ||
) | ||
|
||
) |
This file contains 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