From: Nikita Popov Date: Wed, 2 Jan 2019 14:41:38 +0000 (+0100) Subject: Fix undefined function error message X-Git-Tag: php-7.4.0alpha1~1301 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fe359cf1ff701cdcb66b32882e2352256c4435db;p=php Fix undefined function error message This got fixed on 7.3, but the implementation is slightly different on master and the new test was failing. --- diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index 4a23e72574..f78b961c72 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -784,16 +784,10 @@ ZEND_VM_COLD_HELPER(zend_undefined_function_helper, ANY, ANY) { USE_OPLINE zval *function_name; - char *name; SAVE_OPLINE(); function_name = RT_CONSTANT(opline, opline->op2); - if (opline->opcode == ZEND_INIT_NS_FCALL_BY_NAME) { - name = Z_STRVAL_P(function_name + 2); - } else { - name = Z_STRVAL_P(function_name); - } - zend_throw_error(NULL, "Call to undefined function %s()", name); + zend_throw_error(NULL, "Call to undefined function %s()", Z_STRVAL_P(function_name)); HANDLE_EXCEPTION(); } diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index 267f223cf6..790e01b8f3 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -474,16 +474,10 @@ static zend_never_inline ZEND_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_un { USE_OPLINE zval *function_name; - char *name; SAVE_OPLINE(); function_name = RT_CONSTANT(opline, opline->op2); - if (opline->opcode == ZEND_INIT_NS_FCALL_BY_NAME) { - name = Z_STRVAL_P(function_name + 2); - } else { - name = Z_STRVAL_P(function_name); - } - zend_throw_error(NULL, "Call to undefined function %s()", name); + zend_throw_error(NULL, "Call to undefined function %s()", Z_STRVAL_P(function_name)); HANDLE_EXCEPTION(); }