diff options
Diffstat (limited to 'Zend/tests/bug62005.phpt')
-rw-r--r-- | Zend/tests/bug62005.phpt | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Zend/tests/bug62005.phpt b/Zend/tests/bug62005.phpt new file mode 100644 index 000000000..c99b28726 --- /dev/null +++ b/Zend/tests/bug62005.phpt @@ -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 +) |