diff options
Diffstat (limited to 'Zend/zend_vm_def.h')
| -rw-r--r-- | Zend/zend_vm_def.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index 14c5029fff..24c51f39f6 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -4286,8 +4286,13 @@ ZEND_VM_HANDLER(149, ZEND_HANDLE_EXCEPTION, ANY, ANY) while (EX(fbc)) { EX(called_scope) = (zend_class_entry*)zend_ptr_stack_pop(&EG(arg_types_stack)); if (EX(object)) { - if (IS_CTOR_USED(EX(called_scope))) { - Z_DELREF_P(EX(object)); + if (IS_CTOR_CALL(EX(called_scope))) { + if (IS_CTOR_USED(EX(called_scope))) { + Z_DELREF_P(EX(object)); + } + if (Z_REFCOUNT_P(EX(object)) == 1) { + zend_object_store_ctor_failed(EX(object) TSRMLS_CC); + } } zval_ptr_dtor(&EX(object)); } |
