?? ??? ????, PHP 7.3.2
- Core:
+ . Fixed bug #77376 ("undefined function" message no longer includes
+ namespace). (Laruence)
. Fixed bug #77339 (__callStatic may get incorrect arguments). (Dmitry)
. Fixed bug #77317 (__DIR__, __FILE__, realpath() reveal physical path for
subst virtual drive). (Anatol)
--- /dev/null
+--TEST--
+Bug #77376 ("undefined function" message no longer includes namespace)
+--FILE--
+<?php
+namespace Hello;
+World();
+?>
+--EXPECTF--
+Fatal error: Uncaught Error: Call to undefined function Hello\World() %sbug77376.php:%d
+Stack trace:
+#0 {main}
+ thrown in %sbug77376.php on line %d
fbc = CACHED_PTR(opline->result.num);
if (UNEXPECTED(fbc == NULL)) {
- func_name = RT_CONSTANT(opline, opline->op2) + 1;
- func = zend_hash_find_ex(EG(function_table), Z_STR_P(func_name), 1);
+ func_name = (zval *)RT_CONSTANT(opline, opline->op2);
+ func = zend_hash_find_ex(EG(function_table), Z_STR_P(func_name + 1), 1);
if (func == NULL) {
- func_name++;
- func = zend_hash_find_ex(EG(function_table), Z_STR_P(func_name), 1);
+ func = zend_hash_find_ex(EG(function_table), Z_STR_P(func_name + 2), 1);
if (UNEXPECTED(func == NULL)) {
ZEND_VM_DISPATCH_TO_HELPER(zend_undefined_function_helper, function_name, func_name);
}
fbc = CACHED_PTR(opline->result.num);
if (UNEXPECTED(fbc == NULL)) {
- func_name = RT_CONSTANT(opline, opline->op2) + 1;
- func = zend_hash_find_ex(EG(function_table), Z_STR_P(func_name), 1);
+ func_name = (zval *)RT_CONSTANT(opline, opline->op2);
+ func = zend_hash_find_ex(EG(function_table), Z_STR_P(func_name + 1), 1);
if (func == NULL) {
- func_name++;
- func = zend_hash_find_ex(EG(function_table), Z_STR_P(func_name), 1);
+ func = zend_hash_find_ex(EG(function_table), Z_STR_P(func_name + 2), 1);
if (UNEXPECTED(func == NULL)) {
ZEND_VM_TAIL_CALL(zend_undefined_function_helper_SPEC(func_name ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
}