Nope, it was decided long ago that the bug won't be fixed in ZE1. AFAIC there's been no definite cure so far, but perhaps it can be fixed somehow though I didn't managed to conceive anything reasonable.
It seams that enabling this helps:
#if 0 /* Will be fixed in ZE2, too dangerous to touch in the context of ZE1 */
if (*retval_ptr_ptr == EG(uninitialized_zval_ptr) && PZVAL_IS_REF(*retval_ptr_ptr)) {
zend_error(E_ERROR, "Cannot modify a reference to NULL");
}
#endif
Do you know why it is dengerous? BC?
This of course doesn't solve prolbem with assigning reference from return value of function which doesn't return reference, but it can be supported with additional opcode.
How about it?
Regards, Wojtek
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php