cvs: ZendEngine2 / zend_compile.c

From: Date: Mon, 16 Feb 2004 00:34:23 +0000
Subject: cvs: ZendEngine2 / zend_compile.c
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-2379@lists.php.net to get a copy of this message
helly Sun Feb 15 19:34:23 2004 EDT Modified files: /ZendEngine2 zend_compile.c Log: Bugfix #27227 Mixed case class names causes Fatal Error in Constructor call http://cvs.php.net/diff.php/ZendEngine2/zend_compile.c?r1=1.542&r2=1.543&ty=u Index: ZendEngine2/zend_compile.c diff -u ZendEngine2/zend_compile.c:1.542 ZendEngine2/zend_compile.c:1.543 --- ZendEngine2/zend_compile.c:1.542 Thu Feb 12 08:49:54 2004 +++ ZendEngine2/zend_compile.c Sun Feb 15 19:34:23 2004 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_compile.c,v 1.542 2004/02/12 13:49:54 zeev Exp $ */ +/* $Id: zend_compile.c,v 1.543 2004/02/16 00:34:23 helly Exp $ */ #include "zend_language_parser.h" #include "zend.h" @@ -1669,11 +1669,13 @@ } else { /* don't inherit the old style constructor if we already have the new style cconstructor */ if (!zend_hash_exists(&ce->function_table, ce->name, ce->name_length+1)) { - if (zend_hash_find(&ce->parent->function_table, ce->parent->name, ce->parent->name_length+1, (void **)&function)==SUCCESS) { + char *lcname = zend_str_tolower_dup(ce->parent->name, ce->parent->name_length); + if (zend_hash_find(&ce->parent->function_table, lcname, ce->parent->name_length+1, (void **)&function)==SUCCESS) { /* inherit parent's constructor */ zend_hash_update(&ce->function_table, ce->name, ce->name_length+1, function, sizeof(zend_function), NULL); function_add_ref(function); } + efree(lcname); } } ce->constructor = ce->parent->constructor;

« previous php.zend-engine.cvs (#2379) next »