Skip to content

Commit b0ab5d0

Browse files
committed
Don't set ce for by-ref return type
For the case where we upgrade a prototype to a possible by-ref return from an inheriting method.
1 parent a576253 commit b0ab5d0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Zend/Optimizer/zend_func_info.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ ZEND_API uint32_t zend_get_func_info(
186186
/* It's allowed to override a method that return non-reference with a method that returns a reference */
187187
if (call_info->is_prototype && (ret & ~MAY_BE_REF)) {
188188
ret |= MAY_BE_REF;
189+
*ce = NULL;
189190
}
190191
}
191192
}

0 commit comments

Comments
 (0)