cvs: ZendEngine2(PHP_5_2) / zend_builtin_functions.c /tests bug38942.phpt php-src NEWS

From: Date: Tue, 26 Sep 2006 07:55:09 +0000
Subject: cvs: ZendEngine2(PHP_5_2) / zend_builtin_functions.c /tests bug38942.phpt php-src NEWS
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-5269@lists.php.net to get a copy of this message
dmitry Tue Sep 26 07:55:09 2006 UTC Added files: (Branch: PHP_5_2) /ZendEngine2/tests bug38942.phpt Modified files: /php-src NEWS /ZendEngine2 zend_builtin_functions.c Log: Fixed bug #38942 (Double old-style-ctor inheritance) http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.264&r2=1.2027.2.547.2.265&diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.264 php-src/NEWS:1.2027.2.547.2.265 --- php-src/NEWS:1.2027.2.547.2.264 Mon Sep 25 16:00:43 2006 +++ php-src/NEWS Tue Sep 26 07:55:08 2006 @@ -6,6 +6,7 @@ - Fixed mess with CGI/CLI -d option (now it works with cgi; constants are working exactly like in php.ini; with FastCGI -d affects all requests). (Dmitry) +- Fixed bug #38942 (Double old-style-ctor inheritance). (Dmitry) - Fixed bug #38941 (imap extension does not compile against new version of the imap library). (Ilia) - Fixed bug #38904 (apache2filter changes cwd to /). (Ilia, bjori) http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_builtin_functions.c?r1=1.277.2.12.2.7&r2=1.277.2.12.2.8&diff_format=u Index: ZendEngine2/zend_builtin_functions.c diff -u ZendEngine2/zend_builtin_functions.c:1.277.2.12.2.7 ZendEngine2/zend_builtin_functions.c:1.277.2.12.2.8 --- ZendEngine2/zend_builtin_functions.c:1.277.2.12.2.7 Thu Jul 27 08:20:38 2006 +++ ZendEngine2/zend_builtin_functions.c Tue Sep 26 07:55:09 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_builtin_functions.c,v 1.277.2.12.2.7 2006/07/27 08:20:38 dmitry Exp $ */ +/* $Id: zend_builtin_functions.c,v 1.277.2.12.2.8 2006/09/26 07:55:09 dmitry Exp $ */ #include "zend.h" #include "zend_API.h" @@ -874,9 +874,21 @@ instanceof_function(EG(scope), mptr->common.scope TSRMLS_CC)) || ((mptr->common.fn_flags & ZEND_ACC_PRIVATE) && EG(scope) == mptr->common.scope)))) { - MAKE_STD_ZVAL(method_name); - ZVAL_STRING(method_name, mptr->common.function_name, 1); - zend_hash_next_index_insert(return_value->value.ht, &method_name, sizeof(zval *), NULL); + char *key; + uint key_len; + ulong num_index; + uint len = strlen(mptr->common.function_name); + + /* Do not display old-style inherited constructors */ + if ((mptr->common.fn_flags & ZEND_ACC_CTOR) == 0 || + mptr->common.scope == ce || + zend_hash_get_current_key_ex(&ce->function_table, &key, &key_len, &num_index, 0, &pos) != HASH_KEY_IS_STRING || + zend_binary_strcasecmp(key, key_len-1, mptr->common.function_name, len) == 0) { + + MAKE_STD_ZVAL(method_name); + ZVAL_STRINGL(method_name, mptr->common.function_name, len, 1); + zend_hash_next_index_insert(return_value->value.ht, &method_name, sizeof(zval *), NULL); + } } zend_hash_move_forward_ex(&ce->function_table, &pos); } http://cvs.php.net/viewvc.cgi/ZendEngine2/tests/bug38942.phpt?view=markup&rev=1.1 Index: ZendEngine2/tests/bug38942.phpt +++ ZendEngine2/tests/bug38942.phpt

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