Annotation of embedaddon/php/Zend/tests/bug62005.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Bug #62005 (unexpected behavior when incrementally assigning to a member of a null object)
! 3: --FILE--
! 4: <?php
! 5: function add_points($player, $points) {
! 6: $player->energy += $points;
! 7: print_r($player);
! 8: }
! 9: add_points(NULL, 2);
! 10: --EXPECTF--
! 11: Warning: Creating default object from empty value in %sbug62005.php on line %d
! 12: stdClass Object
! 13: (
! 14: [energy] => 2
! 15: )
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>