File tree Expand file tree Collapse file tree 3 files changed +18
-2
lines changed Expand file tree Collapse file tree 3 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ PHP NEWS
11
11
(Laruence)
12
12
13
13
- Core:
14
+ . Fixed bug #62005 (unexpected behavior when incrementally assigning to a
15
+ member of a null object). (Laruence)
14
16
. Fixed bug #61730 (Segfault from array_walk modifying an array passed by
15
17
reference). (Laruence)
16
18
. Fixed missing bound check in iptcparse(). (chris at chiappa.net)
Original file line number Diff line number Diff line change
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
+ Strict Standards: Creating default object from empty value in %sbug62005.php on line %d
12
+ stdClass Object
13
+ (
14
+ [energy] => 2
15
+ )
Original file line number Diff line number Diff line change @@ -432,11 +432,10 @@ static inline void make_real_object(zval **object_ptr TSRMLS_DC)
432
432
|| (Z_TYPE_PP (object_ptr ) == IS_BOOL && Z_LVAL_PP (object_ptr ) == 0 )
433
433
|| (Z_TYPE_PP (object_ptr ) == IS_STRING && Z_STRLEN_PP (object_ptr ) == 0 )
434
434
) {
435
- zend_error (E_STRICT , "Creating default object from empty value" );
436
-
437
435
SEPARATE_ZVAL_IF_NOT_REF (object_ptr );
438
436
zval_dtor (* object_ptr );
439
437
object_init (* object_ptr );
438
+ zend_error (E_STRICT , "Creating default object from empty value" );
440
439
}
441
440
}
442
441
You can’t perform that action at this time.
0 commit comments