From 996bd9300b547485c01797b78fbefe8eb46b96bb Mon Sep 17 00:00:00 2001 From: Andi Gutmans Date: Fri, 6 Oct 2000 17:34:50 +0000 Subject: [PATCH] - Fix Bug #7061 --- Zend/zend_execute.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Zend/zend_execute.h b/Zend/zend_execute.h index 2663eb32a6..68ca747b76 100644 --- a/Zend/zend_execute.h +++ b/Zend/zend_execute.h @@ -157,16 +157,17 @@ void zend_shutdown_timeout_thread(); static inline void zend_assign_to_variable_reference(znode *result, zval **variable_ptr_ptr, zval **value_ptr_ptr, temp_variable *Ts ELS_DC) { - zval *variable_ptr = *variable_ptr_ptr; + zval *variable_ptr; zval *value_ptr; - - if (!value_ptr_ptr) { - zend_error(E_ERROR, "Cannot create references to string offsets nor overloaded objects"); + if (!value_ptr_ptr || !variable_ptr_ptr) { + zend_error(E_ERROR, "Cannot create references to/from string offsets nor overloaded objects"); return; } + variable_ptr = *variable_ptr_ptr; value_ptr = *value_ptr_ptr; + if (variable_ptr == EG(error_zval_ptr) || value_ptr==EG(error_zval_ptr)) { variable_ptr_ptr = &EG(uninitialized_zval_ptr); /* } else if (variable_ptr==&EG(uninitialized_zval) || variable_ptr!=value_ptr) { */ -- 2.50.1