Commit:    9711c58bc4236c0e2e482af9b20581e78af0c7ca
Author:    Adam Harvey <ahar...@php.net>         Fri, 8 Nov 2013 20:26:46 -0500
Parents:   602fef0e52caacf754eacfb96e9342ce32d29a37
Branches:  PHP-5.6 master

Link:       
http://git.php.net/?p=php-src.git;a=commitdiff;h=9711c58bc4236c0e2e482af9b20581e78af0c7ca

Log:
Stop PHP from modifying the lowercase function name in place.

Changed paths:
  M  Zend/zend_compile.c


Diff:
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index 9c238ac..0313663 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -1740,13 +1740,14 @@ void zend_do_begin_function_declaration(znode 
*function_token, znode *function_n
                opline->op1.constant = zend_add_literal(CG(active_op_array), 
&key TSRMLS_CC);
                Z_HASH_P(&CONSTANT(opline->op1.constant)) = 
zend_hash_func(Z_STRVAL(CONSTANT(opline->op1.constant)), 
Z_STRLEN(CONSTANT(opline->op1.constant)));
                opline->op2_type = IS_CONST;
-               LITERAL_STRINGL(opline->op2, lcname, name_len, 0);
+               LITERAL_STRINGL(opline->op2, lcname, name_len, 1);
                CALCULATE_LITERAL_HASH(opline->op2.constant);
                opline->extended_value = ZEND_DECLARE_FUNCTION;
                zend_hash_quick_update(CG(function_table), Z_STRVAL(key), 
Z_STRLEN(key), Z_HASH_P(&CONSTANT(opline->op1.constant)), &op_array, 
sizeof(zend_op_array), (void **) &CG(active_op_array));
                zend_hash_add(&CG(function_filenames), lcname, 
strlen(lcname)+1, CG(compiled_filename), strlen(CG(compiled_filename))+1, NULL);
                zend_stack_push(&CG(context_stack), (void *) &CG(context), 
sizeof(CG(context)));
                zend_init_compiler_context(TSRMLS_C);
+               str_efree(lcname);
        }
 
        if (CG(compiler_options) & ZEND_COMPILE_EXTENDED_INFO) {


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to