mirror of
https://github.com/php/php-src.git
synced 2024-12-27 02:39:39 +08:00
Merge branch 'PHP-7.3'
* PHP-7.3: Fixed bug #77376 ("undefined function" message no longer includes namespace)
This commit is contained in:
commit
1a0c325b89
12
Zend/tests/bug77376.phpt
Normal file
12
Zend/tests/bug77376.phpt
Normal file
@ -0,0 +1,12 @@
|
||||
--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
|
@ -3431,11 +3431,10 @@ ZEND_VM_HOT_HANDLER(69, ZEND_INIT_NS_FCALL_BY_NAME, ANY, CONST, NUM|CACHE_SLOT)
|
||||
|
||||
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);
|
||||
}
|
||||
|
@ -2113,11 +2113,10 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_NS_FCALL_BY_N
|
||||
|
||||
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(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user