summaryrefslogtreecommitdiff
path: root/Zend/zend_execute.c
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/zend_execute.c')
-rw-r--r--Zend/zend_execute.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c
index d2411ad5c3..13494ca403 100644
--- a/Zend/zend_execute.c
+++ b/Zend/zend_execute.c
@@ -586,7 +586,9 @@ static inline void zend_assign_to_variable_reference(zval *variable_ptr, zval *v
static inline int make_real_object(zval *object)
{
if (UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
- if (EXPECTED(Z_TYPE_P(object) <= IS_FALSE)) {
+ if (UNEXPECTED(object == &EG(error_zval))) {
+ return 0;
+ } else if (EXPECTED(Z_TYPE_P(object) <= IS_FALSE)) {
/* nothing to destroy */
} else if (EXPECTED((Z_TYPE_P(object) == IS_STRING && Z_STRLEN_P(object) == 0))) {
zval_ptr_dtor_nogc(object);