Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* PHP-5.4: Fixed Bug #62005 (unexpected behavior when incrementally assigning to a member of a null object) fix stack overflow in php_intlog10abs() fix stack overflow in php_intlog10abs()
- Loading branch information
Showing
2 changed files
with
16 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--TEST-- | ||
Bug #62005 (unexpected behavior when incrementally assigning to a member of a null object) | ||
--FILE-- | ||
<?php | ||
function add_points($player, $points) { | ||
$player->energy += $points; | ||
print_r($player); | ||
} | ||
add_points(NULL, 2); | ||
--EXPECTF-- | ||
Warning: Creating default object from empty value in %sbug62005.php on line %d | ||
stdClass Object | ||
( | ||
[energy] => 2 | ||
) |
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