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.
This commit is contained in:
Nikita Popov 2019-01-02 15:41:38 +01:00
parent 31375c5ca3
commit fe359cf1ff
2 changed files with 2 additions and 14 deletions

View file

@ -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();
}

View file

@ -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();
}