From 33476ec301652f0ed3b56855039d19b7f5be0887 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 8 Jan 2020 14:26:27 +0100 Subject: [PATCH] Refer to method rather than function name in error message --- Zend/tests/call_static_004.phpt | 2 +- Zend/tests/dynamic_call_002.phpt | 2 +- Zend/tests/dynamic_call_003.phpt | 2 +- Zend/zend_vm_def.h | 2 +- Zend/zend_vm_execute.h | 24 ++++++++++++------------ 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Zend/tests/call_static_004.phpt b/Zend/tests/call_static_004.phpt index 427c12fc96..af53afb12b 100644 --- a/Zend/tests/call_static_004.phpt +++ b/Zend/tests/call_static_004.phpt @@ -18,7 +18,7 @@ foo::$a(); --EXPECTF-- string(3) "AaA" -Fatal error: Uncaught Error: Function name must be a string in %s:%d +Fatal error: Uncaught Error: Method name must be a string in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/dynamic_call_002.phpt b/Zend/tests/dynamic_call_002.phpt index a090862258..2fcb8702eb 100644 --- a/Zend/tests/dynamic_call_002.phpt +++ b/Zend/tests/dynamic_call_002.phpt @@ -9,7 +9,7 @@ $a::$a(); ?> --EXPECTF-- -Fatal error: Uncaught Error: Function name must be a string in %s:%d +Fatal error: Uncaught Error: Method name must be a string in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/dynamic_call_003.phpt b/Zend/tests/dynamic_call_003.phpt index a400e33596..c19b68eccc 100644 --- a/Zend/tests/dynamic_call_003.phpt +++ b/Zend/tests/dynamic_call_003.phpt @@ -10,7 +10,7 @@ $a::$b(); ?> --EXPECTF-- -Fatal error: Uncaught Error: Function name must be a string in %s:%d +Fatal error: Uncaught Error: Method name must be a string in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index 608d24f508..92b20627e1 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -3563,7 +3563,7 @@ ZEND_VM_HANDLER(113, ZEND_INIT_STATIC_METHOD_CALL, UNUSED|CLASS_FETCH|CONST|VAR, HANDLE_EXCEPTION(); } } - zend_throw_error(NULL, "Function name must be a string"); + zend_throw_error(NULL, "Method name must be a string"); FREE_OP2(); HANDLE_EXCEPTION(); } while (0); diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index 3940598619..3a11acbdc8 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -5762,7 +5762,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_C HANDLE_EXCEPTION(); } } - zend_throw_error(NULL, "Function name must be a string"); + zend_throw_error(NULL, "Method name must be a string"); HANDLE_EXCEPTION(); } while (0); @@ -7937,7 +7937,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_C HANDLE_EXCEPTION(); } } - zend_throw_error(NULL, "Function name must be a string"); + zend_throw_error(NULL, "Method name must be a string"); zval_ptr_dtor_nogc(EX_VAR(opline->op2.var)); HANDLE_EXCEPTION(); } while (0); @@ -8680,7 +8680,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_C HANDLE_EXCEPTION(); } } - zend_throw_error(NULL, "Function name must be a string"); + zend_throw_error(NULL, "Method name must be a string"); HANDLE_EXCEPTION(); } while (0); @@ -10193,7 +10193,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_C HANDLE_EXCEPTION(); } } - zend_throw_error(NULL, "Function name must be a string"); + zend_throw_error(NULL, "Method name must be a string"); HANDLE_EXCEPTION(); } while (0); @@ -22627,7 +22627,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_V HANDLE_EXCEPTION(); } } - zend_throw_error(NULL, "Function name must be a string"); + zend_throw_error(NULL, "Method name must be a string"); HANDLE_EXCEPTION(); } while (0); @@ -24857,7 +24857,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_V HANDLE_EXCEPTION(); } } - zend_throw_error(NULL, "Function name must be a string"); + zend_throw_error(NULL, "Method name must be a string"); zval_ptr_dtor_nogc(EX_VAR(opline->op2.var)); HANDLE_EXCEPTION(); } while (0); @@ -26129,7 +26129,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_V HANDLE_EXCEPTION(); } } - zend_throw_error(NULL, "Function name must be a string"); + zend_throw_error(NULL, "Method name must be a string"); HANDLE_EXCEPTION(); } while (0); @@ -28382,7 +28382,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_V HANDLE_EXCEPTION(); } } - zend_throw_error(NULL, "Function name must be a string"); + zend_throw_error(NULL, "Method name must be a string"); HANDLE_EXCEPTION(); } while (0); @@ -30550,7 +30550,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_U HANDLE_EXCEPTION(); } } - zend_throw_error(NULL, "Function name must be a string"); + zend_throw_error(NULL, "Method name must be a string"); HANDLE_EXCEPTION(); } while (0); @@ -32418,7 +32418,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_U HANDLE_EXCEPTION(); } } - zend_throw_error(NULL, "Function name must be a string"); + zend_throw_error(NULL, "Method name must be a string"); zval_ptr_dtor_nogc(EX_VAR(opline->op2.var)); HANDLE_EXCEPTION(); } while (0); @@ -32834,7 +32834,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_U HANDLE_EXCEPTION(); } } - zend_throw_error(NULL, "Function name must be a string"); + zend_throw_error(NULL, "Method name must be a string"); HANDLE_EXCEPTION(); } while (0); @@ -34812,7 +34812,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_U HANDLE_EXCEPTION(); } } - zend_throw_error(NULL, "Function name must be a string"); + zend_throw_error(NULL, "Method name must be a string"); HANDLE_EXCEPTION(); } while (0); -- 2.40.0