cvs: ZendEngine2(PHP_5_0) / zend_object_handlers.c /tests bug29015.phpt php-src NEWS

From: Date: Thu, 28 Apr 2005 17:39:59 +0000
Subject: cvs: ZendEngine2(PHP_5_0) / zend_object_handlers.c /tests bug29015.phpt php-src NEWS
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-3608@lists.php.net to get a copy of this message
dmitry Thu Apr 28 13:39:59 2005 EDT Added files: (Branch: PHP_5_0) /ZendEngine2/tests bug29015.phpt Modified files: /php-src NEWS /ZendEngine2 zend_object_handlers.c Log: Fixed bug #29015 (Incorrect behavior of member vars(non string ones)-numeric mem vars und others) http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1760.2.358&r2=1.1760.2.359&ty=u Index: php-src/NEWS diff -u php-src/NEWS:1.1760.2.358 php-src/NEWS:1.1760.2.359 --- php-src/NEWS:1.1760.2.358 Thu Apr 28 08:19:09 2005 +++ php-src/NEWS Thu Apr 28 13:39:51 2005 @@ -68,6 +68,8 @@ - Fixed bug #29210 (Function: is_callable - no support for private and protected classes). (Dmitry) - Fixed bug #29104 (Function declaration in method doesn't work). (Dmitry) +- Fixed bug #29015 (Incorrect behavior of member vars(non string ones)-numeric + mem vars und others). (Dmitry) - Fixed bug #28839 (SIGSEGV in interactive mode (php -a)). (kameshj at fastmail dot fm) http://cvs.php.net/diff.php/ZendEngine2/zend_object_handlers.c?r1=1.101.2.8&r2=1.101.2.9&ty=u Index: ZendEngine2/zend_object_handlers.c diff -u ZendEngine2/zend_object_handlers.c:1.101.2.8 ZendEngine2/zend_object_handlers.c:1.101.2.9 --- ZendEngine2/zend_object_handlers.c:1.101.2.8 Wed Apr 27 11:44:06 2005 +++ ZendEngine2/zend_object_handlers.c Thu Apr 28 13:39:56 2005 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_object_handlers.c,v 1.101.2.8 2005/04/27 15:44:06 dmitry Exp $ */ +/* $Id: zend_object_handlers.c,v 1.101.2.9 2005/04/28 17:39:56 dmitry Exp $ */ #include "zend.h" #include "zend_globals.h" @@ -199,6 +199,16 @@ zend_property_info *scope_property_info; zend_bool denied_access = 0; + if (Z_STRVAL_P(member)[0] == '\0') { + if (!silent) { + if (Z_STRLEN_P(member) == 0) { + zend_error(E_ERROR, "Cannot access empty property"); + } else { + zend_error(E_ERROR, "Cannot access property started with '\\0'"); + } + } + return NULL; + } ulong h = zend_get_hash_value(Z_STRVAL_P(member), Z_STRLEN_P(member)+1); if (zend_hash_quick_find(&zobj->ce->properties_info, Z_STRVAL_P(member), Z_STRLEN_P(member)+1, h, (void **) &property_info)==SUCCESS) { if (zend_verify_property_access(property_info, zobj->ce TSRMLS_CC)) { http://cvs.php.net/co.php/ZendEngine2/tests/bug29015.phpt?r=1.1&p=1 Index: ZendEngine2/tests/bug29015.phpt +++ ZendEngine2/tests/bug29015.phpt

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