(Laruence)
- Core:
+ . Fixed bug #62005 (unexpected behavior when incrementally assigning to a
+ member of a null object). (Laruence)
. Fixed bug #61730 (Segfault from array_walk modifying an array passed by
reference). (Laruence)
. Fixed missing bound check in iptcparse(). (chris at chiappa.net)
--- /dev/null
+--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--
+Strict Standards: Creating default object from empty value in %sbug62005.php on line %d
+stdClass Object
+(
+ [energy] => 2
+)
|| (Z_TYPE_PP(object_ptr) == IS_BOOL && Z_LVAL_PP(object_ptr) == 0)
|| (Z_TYPE_PP(object_ptr) == IS_STRING && Z_STRLEN_PP(object_ptr) == 0)
) {
- zend_error(E_STRICT, "Creating default object from empty value");
-
SEPARATE_ZVAL_IF_NOT_REF(object_ptr);
zval_dtor(*object_ptr);
object_init(*object_ptr);
+ zend_error(E_STRICT, "Creating default object from empty value");
}
}