Skip to content

Commit f6580f7

Browse files
committed
Remove last E_ERROR in zend_vm_def.h
After further considertion simply throwing an exception is safe here.
1 parent bcd2570 commit f6580f7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Zend/zend_vm_def.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2116,7 +2116,7 @@ ZEND_VM_HELPER(zend_do_fcall_common_helper, ANY, ANY)
21162116
if (EXPECTED(EX(object) != NULL)) {
21172117
Z_OBJ_HT_P(EX(object))->call_method(fbc->common.function_name, opline->extended_value, EX_T(opline->result.var).var.ptr, &EX_T(opline->result.var).var.ptr, EX(object), RETURN_VALUE_USED(opline) TSRMLS_CC);
21182118
} else {
2119-
zend_error_noreturn(E_ERROR, "Cannot call overloaded function for non-object");
2119+
zend_throw_engine_exception("Cannot call overloaded function for non-object" TSRMLS_CC);
21202120
}
21212121

21222122
if (fbc->type == ZEND_OVERLOADED_FUNCTION_TEMPORARY) {

Zend/zend_vm_execute.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,7 @@ static int ZEND_FASTCALL zend_do_fcall_common_helper_SPEC(ZEND_OPCODE_HANDLER_AR
610610
if (EXPECTED(EX(object) != NULL)) {
611611
Z_OBJ_HT_P(EX(object))->call_method(fbc->common.function_name, opline->extended_value, EX_T(opline->result.var).var.ptr, &EX_T(opline->result.var).var.ptr, EX(object), RETURN_VALUE_USED(opline) TSRMLS_CC);
612612
} else {
613-
zend_error_noreturn(E_ERROR, "Cannot call overloaded function for non-object");
613+
zend_throw_engine_exception("Cannot call overloaded function for non-object" TSRMLS_CC);
614614
}
615615

616616
if (fbc->type == ZEND_OVERLOADED_FUNCTION_TEMPORARY) {

0 commit comments

Comments
 (0)