Skip to content

Commit aa3f8ed

Browse files
committed
Fix guard propagation for unset()
1 parent 7342bea commit aa3f8ed

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

Zend/tests/lazy_objects/gh18038-010.phpt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ var_dump($obj);
2626
--EXPECTF--
2727
string(10) "C::__unset"
2828
init
29-
string(10) "C::__unset"
3029
lazy proxy object(C)#%d (1) {
3130
["instance"]=>
3231
object(C)#%d (1) {

Zend/zend_object_handlers.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1574,10 +1574,10 @@ ZEND_API void zend_std_unset_property(zend_object *zobj, zend_string *name, void
15741574

15751575
if (UNEXPECTED(guard)) {
15761576
guard = zend_get_property_guard(zobj, name);
1577-
if (!((*guard) & IN_ISSET)) {
1578-
(*guard) |= IN_ISSET;
1577+
if (!((*guard) & IN_UNSET)) {
1578+
(*guard) |= IN_UNSET;
15791579
zend_std_unset_property(zobj, name, cache_slot);
1580-
(*guard) &= ~IN_ISSET;
1580+
(*guard) &= ~IN_UNSET;
15811581
return;
15821582
}
15831583
}

0 commit comments

Comments
 (0)