summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-01-02 15:41:38 +0100
committerNikita Popov <nikita.ppv@gmail.com>2019-01-02 15:41:38 +0100
commitfe359cf1ff701cdcb66b32882e2352256c4435db (patch)
tree10daaa0cb9398e3f8999ab4905b8bd6a9aaf16c1
parent31375c5ca32a750305b83908c8e812b15814bced (diff)
downloadphp-git-fe359cf1ff701cdcb66b32882e2352256c4435db.tar.gz
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.
-rw-r--r--Zend/zend_vm_def.h8
-rw-r--r--Zend/zend_vm_execute.h8
2 files changed, 2 insertions, 14 deletions
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();
}