cvs: ZendEngine2(PHP_5_1) / zend_object_handlers.c /tests bug34893.phpt php-src NEWS

From: Date: Thu, 20 Oct 2005 09:47:13 +0000
Subject: cvs: ZendEngine2(PHP_5_1) / zend_object_handlers.c /tests bug34893.phpt php-src NEWS
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-4266@lists.php.net to get a copy of this message
dmitry Thu Oct 20 05:47:13 2005 EDT Added files: (Branch: PHP_5_1) /ZendEngine2/tests bug34893.phpt Modified files: /php-src NEWS /ZendEngine2 zend_object_handlers.c Log: Fixed bug #34893 (PHP5.1 overloading, Cannot access private property) http://cvs.php.net/diff.php/php-src/NEWS?r1=1.2027.2.146&r2=1.2027.2.147&ty=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.146 php-src/NEWS:1.2027.2.147 --- php-src/NEWS:1.2027.2.146 Thu Oct 20 04:55:07 2005 +++ php-src/NEWS Thu Oct 20 05:47:01 2005 @@ -3,6 +3,8 @@ ?? Oct 2005, PHP 5.1 Release Candidate 4 - Fixed bug #34905 (Digest authentication does not work with Apache 1). (Ilia) - Fixed bug #34902 (mysqli::character_set_name() - undefined method). (Tony) +- Fixed bug #34893 (PHP5.1 overloading, Cannot access private property). + (Dmitry) - Fixed bug #34899 (Fixed sqlite extension compile failure). (Ilia) - Fixed bug #34767 (Zend Engine 1 Compatibility not copying objects correctly). (Dmitry) http://cvs.php.net/diff.php/ZendEngine2/zend_object_handlers.c?r1=1.135.2.1&r2=1.135.2.2&ty=u Index: ZendEngine2/zend_object_handlers.c diff -u ZendEngine2/zend_object_handlers.c:1.135.2.1 ZendEngine2/zend_object_handlers.c:1.135.2.2 --- ZendEngine2/zend_object_handlers.c:1.135.2.1 Thu Sep 1 06:05:32 2005 +++ ZendEngine2/zend_object_handlers.c Thu Oct 20 05:47:12 2005 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_object_handlers.c,v 1.135.2.1 2005/09/01 10:05:32 dmitry Exp $ */ +/* $Id: zend_object_handlers.c,v 1.135.2.2 2005/10/20 09:47:12 dmitry Exp $ */ #include "zend.h" #include "zend_globals.h" @@ -482,8 +482,10 @@ zval tmp_member; zval **retval; zend_property_info *property_info; + zend_bool use_get; zobj = Z_OBJ_P(object); + use_get = (zobj->ce->__get && !zobj->in_get); if (member->type != IS_STRING) { tmp_member = *member; @@ -496,12 +498,12 @@ fprintf(stderr, "Ptr object #%d property: %s\n", Z_OBJ_HANDLE_P(object), Z_STRVAL_P(member)); #endif - property_info = zend_get_property_info(zobj->ce, member, 0 TSRMLS_CC); + property_info = zend_get_property_info(zobj->ce, member, use_get TSRMLS_CC); - if (zend_hash_quick_find(zobj->properties, property_info->name, property_info->name_length+1, property_info->h, (void **) &retval) == FAILURE) { + if (!property_info || zend_hash_quick_find(zobj->properties, property_info->name, property_info->name_length+1, property_info->h, (void **) &retval) == FAILURE) { zval *new_zval; - if (!zobj->ce->__get && !zobj->ce->__set) { + if (!use_get) { /* we don't have access controls - will just add it */ new_zval = &EG(uninitialized_zval); http://cvs.php.net/co.php/ZendEngine2/tests/bug34893.phpt?r=1.1&p=1 Index: ZendEngine2/tests/bug34893.phpt +++ ZendEngine2/tests/bug34893.phpt

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