Attached is a patch for zend_execute.c which will fall to read_property if get_property_ptr_ptr returns NULL in zend_fetch_property_address_inner. Hopefully this is the correct fix as it didnt break any tests and resolves the issue I hit.
Rob From: Marcus Boerger > Sounds more like small oversight. Could you try to make a patch for that?
Index: zend_execute.c =================================================================== RCS file: /repository/ZendEngine2/zend_execute.c,v retrieving revision 1.651 diff -r1.651 zend_execute.c 156a157 > int have_get_ptr = 0; 176c177,186 < if(NULL == ptr_ptr) { --- > if(NULL != ptr_ptr) { > have_get_ptr = 1; > T(result->u.var).var.ptr_ptr = ptr_ptr; > } > } > if (have_get_ptr != 1) { > if (Z_OBJ_HT_P(object)->read_property) { > T(result->u.var).var.ptr = > Z_OBJ_HT_P(object)->read_property(object, prop_ptr, BP_VAR_W TSRMLS_CC); > T(result->u.var).var.ptr_ptr = &T(result->u.var).var.ptr; > } else { 177a188 > T(result->u.var).var.ptr_ptr = &EG(error_zval_ptr); 179,185d189 < T(result->u.var).var.ptr_ptr = ptr_ptr; < } else if (Z_OBJ_HT_P(object)->read_property) { < T(result->u.var).var.ptr = Z_OBJ_HT_P(object)->read_property(object, prop_ptr, BP_VAR_W TSRMLS_CC); < T(result->u.var).var.ptr_ptr = &T(result->u.var).var.ptr; < } else { < zend_error(E_WARNING, "This object doesn't support property references"); < T(result->u.var).var.ptr_ptr = &EG(error_zval_ptr);
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php