mirror of
https://github.com/php/php-src.git
synced 2025-08-18 15:08:55 +02:00
ixed bug that exception won't be catched
Related failed test Zend/tests/bug35437.phpt (after he latest execute_data improvement, run with non CALL vm kind)
This commit is contained in:
parent
d3ec9ceb25
commit
210d428f99
2 changed files with 12 additions and 4 deletions
|
@ -1942,14 +1942,15 @@ ZEND_VM_HELPER(zend_do_fcall_common_helper, ANY, ANY)
|
|||
if (UNEXPECTED((fbc->common.fn_flags & (ZEND_ACC_ABSTRACT|ZEND_ACC_DEPRECATED)) != 0)) {
|
||||
if (UNEXPECTED((fbc->common.fn_flags & ZEND_ACC_ABSTRACT) != 0)) {
|
||||
zend_error_noreturn(E_ERROR, "Cannot call abstract method %s::%s()", fbc->common.scope->name, fbc->common.function_name);
|
||||
CHECK_EXCEPTION();
|
||||
ZEND_VM_NEXT_OPCODE(); /* Never reached */
|
||||
}
|
||||
if (UNEXPECTED((fbc->common.fn_flags & ZEND_ACC_DEPRECATED) != 0)) {
|
||||
zend_error(E_DEPRECATED, "Function %s%s%s() is deprecated",
|
||||
fbc->common.scope ? fbc->common.scope->name : "",
|
||||
fbc->common.scope ? "::" : "",
|
||||
fbc->common.function_name);
|
||||
if (UNEXPECTED(EG(exception) != NULL)) {
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (fbc->common.scope &&
|
||||
|
@ -1959,6 +1960,9 @@ ZEND_VM_HELPER(zend_do_fcall_common_helper, ANY, ANY)
|
|||
if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
|
||||
/* FIXME: output identifiers properly */
|
||||
zend_error(E_STRICT, "Non-static method %s::%s() should not be called statically", fbc->common.scope->name, fbc->common.function_name);
|
||||
if (UNEXPECTED(EG(exception) != NULL)) {
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
} else {
|
||||
/* FIXME: output identifiers properly */
|
||||
/* An internal function assumes $this is present and won't check that. So PHP would crash by allowing the call. */
|
||||
|
|
|
@ -482,14 +482,15 @@ static int ZEND_FASTCALL zend_do_fcall_common_helper_SPEC(ZEND_OPCODE_HANDLER_AR
|
|||
if (UNEXPECTED((fbc->common.fn_flags & (ZEND_ACC_ABSTRACT|ZEND_ACC_DEPRECATED)) != 0)) {
|
||||
if (UNEXPECTED((fbc->common.fn_flags & ZEND_ACC_ABSTRACT) != 0)) {
|
||||
zend_error_noreturn(E_ERROR, "Cannot call abstract method %s::%s()", fbc->common.scope->name, fbc->common.function_name);
|
||||
CHECK_EXCEPTION();
|
||||
ZEND_VM_NEXT_OPCODE(); /* Never reached */
|
||||
}
|
||||
if (UNEXPECTED((fbc->common.fn_flags & ZEND_ACC_DEPRECATED) != 0)) {
|
||||
zend_error(E_DEPRECATED, "Function %s%s%s() is deprecated",
|
||||
fbc->common.scope ? fbc->common.scope->name : "",
|
||||
fbc->common.scope ? "::" : "",
|
||||
fbc->common.function_name);
|
||||
if (UNEXPECTED(EG(exception) != NULL)) {
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (fbc->common.scope &&
|
||||
|
@ -499,6 +500,9 @@ static int ZEND_FASTCALL zend_do_fcall_common_helper_SPEC(ZEND_OPCODE_HANDLER_AR
|
|||
if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
|
||||
/* FIXME: output identifiers properly */
|
||||
zend_error(E_STRICT, "Non-static method %s::%s() should not be called statically", fbc->common.scope->name, fbc->common.function_name);
|
||||
if (UNEXPECTED(EG(exception) != NULL)) {
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
} else {
|
||||
/* FIXME: output identifiers properly */
|
||||
/* An internal function assumes $this is present and won't check that. So PHP would crash by allowing the call. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue