mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Fixed bug #78644
Make sure the initialize the result of FETCH_OBJ_UNSET operations. I'm using a NULL value rather than ERROR here, because the latter no longer exists in master.
This commit is contained in:
parent
d1de1777e9
commit
ad3ddf46f9
3 changed files with 19 additions and 0 deletions
2
NEWS
2
NEWS
|
@ -8,6 +8,8 @@ PHP NEWS
|
|||
. Fixed bug #78620 (Out of memory error). (cmb, Nikita)
|
||||
. Fixed bug #78632 (method_exists() in php74 works differently from php73 in
|
||||
checking priv. methods). (Nikita)
|
||||
. Fixed bug #78644 (SEGFAULT in ZEND_UNSET_OBJ_SPEC_VAR_CONST_HANDLER).
|
||||
(Nikita)
|
||||
|
||||
- Iconv:
|
||||
. Fixed bug #78642 (Wrong libiconv version displayed). (gedas at martynas,
|
||||
|
|
16
Zend/tests/bug78644.phpt
Normal file
16
Zend/tests/bug78644.phpt
Normal file
|
@ -0,0 +1,16 @@
|
|||
--TEST--
|
||||
Bug #78644: SEGFAULT in ZEND_UNSET_OBJ_SPEC_VAR_CONST_HANDLER
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$a = new stdClass;
|
||||
unset($a->b->c->d);
|
||||
unset($a->b->c['d']);
|
||||
var_dump($a);
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
object(stdClass)#1 (1) {
|
||||
["b"]=>
|
||||
NULL
|
||||
}
|
|
@ -2765,6 +2765,7 @@ static zend_always_inline void zend_fetch_property_address(zval *result, zval *c
|
|||
|
||||
/* this should modify object only if it's empty */
|
||||
if (type == BP_VAR_UNSET) {
|
||||
ZVAL_NULL(result);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue