]> granicus.if.org Git - php/commitdiff
Merge branch 'PHP-7.3'
authorXinchen Hui <laruence@gmail.com>
Wed, 2 Jan 2019 07:32:29 +0000 (15:32 +0800)
committerXinchen Hui <laruence@gmail.com>
Wed, 2 Jan 2019 07:32:29 +0000 (15:32 +0800)
* PHP-7.3:
  Fixed bug #77376 ("undefined function" message no longer includes namespace)

1  2 
Zend/zend_vm_def.h
Zend/zend_vm_execute.h

index b82982bd33ed4c4e34a6d7d401ffea7671875bcb,a49baa5a9bc1294b8c12b938ce5280842f7c1b44..4a23e7257458945f1db59b753b2fb369d53f780d
@@@ -3431,13 -3443,12 +3431,12 @@@ ZEND_VM_HOT_HANDLER(69, ZEND_INIT_NS_FC
  
        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);
 +                              ZEND_VM_DISPATCH_TO_HELPER(zend_undefined_function_helper);
                        }
                }
                fbc = Z_FUNC_P(func);
index 73a47fbc4b17b73200bf2691f71c9e073cab795d,49bc2c0de77e630f2a7dea7575c5ae15c391586f..267f223cf68f91f43c89965ac1d1f3825efe97cb
@@@ -2113,13 -2153,12 +2113,12 @@@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_
  
        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));
 +                              ZEND_VM_TAIL_CALL(zend_undefined_function_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
                        }
                }
                fbc = Z_FUNC_P(func);