Skip to content

Commit 3b635c2

Browse files
committed
ext/reflection: fix bug 20873 - cannot assign by reference to overloaded object
1 parent d32338e commit 3b635c2

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

Zend/zend_execute.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3624,20 +3624,14 @@ static zend_always_inline void zend_fetch_property_address(zval *result, zval *c
36243624
ZVAL_ERROR(result);
36253625
goto end;
36263626
}
3627-
if (UNEXPECTED(!Z_REFCOUNTED_P(ptr) && !Z_ISREF_P(ptr) && Z_TYPE_P(ptr) != IS_INDIRECT )) {
3628-
if (Z_TYPE_P(ptr) == IS_FALSE) {
3629-
ZVAL_FALSE(result);
3630-
}
3631-
if (Z_TYPE_P(ptr) == IS_NULL) {
3632-
ZVAL_NULL(result);
3633-
}
3627+
if (Z_TYPE_P(ptr) == IS_NULL && Z_NEXT_P(ptr) == 0) {
3628+
ZVAL_NULL(result);
36343629
goto end;
36353630
}
36363631
} else if (UNEXPECTED(Z_ISERROR_P(ptr))) {
36373632
ZVAL_ERROR(result);
36383633
goto end;
36393634
}
3640-
36413635
ZVAL_INDIRECT(result, ptr);
36423636
flags &= ZEND_FETCH_OBJ_FLAGS;
36433637
if (flags) {

0 commit comments

Comments
 (0)