From: Xinchen Hui Date: Tue, 28 Jul 2015 06:54:53 +0000 (+0800) Subject: Previously fix is not right X-Git-Tag: php-7.0.0beta3~5^2~84 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4e9674f1a302fecdca6963a982c7b5d26f30cd65;p=php Previously fix is not right --- diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index ce5d520aa2..0d0eee1628 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -3089,6 +3089,9 @@ ZEND_VM_HANDLER(113, ZEND_INIT_STATIC_METHOD_CALL, CONST|VAR, CONST|TMPVAR|UNUSE E_DEPRECATED, "Non-static method %s::%s() should not be called statically", ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name)); + if (UNEXPECTED(EG(exception) != NULL)) { + HANDLE_EXCEPTION(); + } } else { /* An internal function assumes $this is present and won't check that. * So PHP would crash by allowing the call. */ diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index da2eeada13..36578da670 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -5656,6 +5656,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_C E_DEPRECATED, "Non-static method %s::%s() should not be called statically", ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name)); + if (UNEXPECTED(EG(exception) != NULL)) { + HANDLE_EXCEPTION(); + } } else { /* An internal function assumes $this is present and won't check that. * So PHP would crash by allowing the call. */ @@ -7666,6 +7669,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_C E_DEPRECATED, "Non-static method %s::%s() should not be called statically", ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name)); + if (UNEXPECTED(EG(exception) != NULL)) { + HANDLE_EXCEPTION(); + } } else { /* An internal function assumes $this is present and won't check that. * So PHP would crash by allowing the call. */ @@ -9397,6 +9403,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_C E_DEPRECATED, "Non-static method %s::%s() should not be called statically", ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name)); + if (UNEXPECTED(EG(exception) != NULL)) { + HANDLE_EXCEPTION(); + } } else { /* An internal function assumes $this is present and won't check that. * So PHP would crash by allowing the call. */ @@ -11201,6 +11210,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_C E_DEPRECATED, "Non-static method %s::%s() should not be called statically", ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name)); + if (UNEXPECTED(EG(exception) != NULL)) { + HANDLE_EXCEPTION(); + } } else { /* An internal function assumes $this is present and won't check that. * So PHP would crash by allowing the call. */ @@ -17536,6 +17548,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_V E_DEPRECATED, "Non-static method %s::%s() should not be called statically", ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name)); + if (UNEXPECTED(EG(exception) != NULL)) { + HANDLE_EXCEPTION(); + } } else { /* An internal function assumes $this is present and won't check that. * So PHP would crash by allowing the call. */ @@ -19160,6 +19175,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_V E_DEPRECATED, "Non-static method %s::%s() should not be called statically", ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name)); + if (UNEXPECTED(EG(exception) != NULL)) { + HANDLE_EXCEPTION(); + } } else { /* An internal function assumes $this is present and won't check that. * So PHP would crash by allowing the call. */ @@ -20761,6 +20779,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_V E_DEPRECATED, "Non-static method %s::%s() should not be called statically", ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name)); + if (UNEXPECTED(EG(exception) != NULL)) { + HANDLE_EXCEPTION(); + } } else { /* An internal function assumes $this is present and won't check that. * So PHP would crash by allowing the call. */ @@ -22314,6 +22335,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_V E_DEPRECATED, "Non-static method %s::%s() should not be called statically", ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name)); + if (UNEXPECTED(EG(exception) != NULL)) { + HANDLE_EXCEPTION(); + } } else { /* An internal function assumes $this is present and won't check that. * So PHP would crash by allowing the call. */