]> granicus.if.org Git - php/commitdiff
Merge branch 'PHP-7.3' into PHP-7.4
authorNikita Popov <nikita.ppv@gmail.com>
Tue, 29 Jan 2019 08:40:19 +0000 (09:40 +0100)
committerNikita Popov <nikita.ppv@gmail.com>
Tue, 29 Jan 2019 08:40:19 +0000 (09:40 +0100)
1  2 
Zend/zend_compile.c

index 01c90559db7a48cfd051f4392ee73296d4939c33,fccc45c9942244293fcb8158673da1ef0ad71512..5f86710b246c1dee7d9ded83f3d8a46c60d98609
@@@ -3805,14 -4009,19 +3799,22 @@@ void zend_compile_call(znode *result, z
                zend_op *opline;
  
                lcname = zend_string_tolower(Z_STR_P(name));
                fbc = zend_hash_find_ptr(CG(function_table), lcname);
+               /* Special assert() handling should apply independently of compiler flags. */
+               if (fbc && zend_string_equals_literal(lcname, "assert")) {
+                       zend_compile_assert(result, zend_ast_get_list(args_ast), lcname, fbc);
+                       zend_string_release(lcname);
+                       zval_ptr_dtor(&name_node.u.constant);
+                       return;
+               }
                if (!fbc
 +                      /* Don't use INIT_FCALL for recursive calls */
 +               || (fbc == (zend_function*)CG(active_op_array))
                 || (fbc->type == ZEND_INTERNAL_FUNCTION && (CG(compiler_options) & ZEND_COMPILE_IGNORE_INTERNAL_FUNCTIONS))
                 || (fbc->type == ZEND_USER_FUNCTION && (CG(compiler_options) & ZEND_COMPILE_IGNORE_USER_FUNCTIONS))
 +               || (fbc->type == ZEND_USER_FUNCTION && (CG(compiler_options) & ZEND_COMPILE_IGNORE_OTHER_FILES) && fbc->op_array.filename != CG(active_op_array)->filename)
                ) {
                        zend_string_release_ex(lcname, 0);
                        zend_compile_dynamic_call(result, &name_node, args_ast);