cvs: ZendEngine2(PHP_5_0) / zend_builtin_functions.c /tests bug32296.phpt php-src NEWS

From: Date: Tue, 03 May 2005 08:50:14 +0000
Subject: cvs: ZendEngine2(PHP_5_0) / zend_builtin_functions.c /tests bug32296.phpt php-src NEWS
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-3637@lists.php.net to get a copy of this message
dmitry Tue May 3 04:50:14 2005 EDT Added files: (Branch: PHP_5_0) /ZendEngine2/tests bug32296.phpt Modified files: /php-src NEWS /ZendEngine2 zend_builtin_functions.c Log: Fixed bug #32296 (get_class_methods output has changed between 5.0.2 and 5.0.3) Now get_class_methods() shows accessible private and protected methods if it is called from class scope. http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1760.2.364&r2=1.1760.2.365&ty=u Index: php-src/NEWS diff -u php-src/NEWS:1.1760.2.364 php-src/NEWS:1.1760.2.365 --- php-src/NEWS:1.1760.2.364 Mon May 2 12:14:14 2005 +++ php-src/NEWS Tue May 3 04:50:10 2005 @@ -49,6 +49,8 @@ (Uwe Schindler) - Fixed bug #32405 (mysqli::fetch() returns bad data - 64bit problem). (Andrey) - Fixed bug #32282 (Segfault in mysqli_fetch_array on 64-bit). (Georg) +- Fixed bug #32296 (get_class_methods output has changed between 5.0.2 and + 5.0.3). (Dmitry) - Fixed bug #32245 (xml_parser_free() in a function assigned to the xml parser gives a segfault). (Rob) - Fixed bug #32080 (segfault when assigning object to itself with http://cvs.php.net/diff.php/ZendEngine2/zend_builtin_functions.c?r1=1.239.2.20&r2=1.239.2.21&ty=u Index: ZendEngine2/zend_builtin_functions.c diff -u ZendEngine2/zend_builtin_functions.c:1.239.2.20 ZendEngine2/zend_builtin_functions.c:1.239.2.21 --- ZendEngine2/zend_builtin_functions.c:1.239.2.20 Mon Apr 18 03:24:25 2005 +++ ZendEngine2/zend_builtin_functions.c Tue May 3 04:50:13 2005 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_builtin_functions.c,v 1.239.2.20 2005/04/18 07:24:25 dmitry Exp $ */ +/* $Id: zend_builtin_functions.c,v 1.239.2.21 2005/05/03 08:50:13 dmitry Exp $ */ #include "zend.h" #include "zend_API.h" @@ -802,7 +802,6 @@ zend_class_entry *ce = NULL, **pce; HashPosition pos; zend_function *mptr; - int instanceof; if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &class)==FAILURE) { ZEND_WRONG_PARAM_COUNT(); @@ -824,14 +823,16 @@ RETURN_NULL(); } - instanceof = EG(scope) && instanceof_function(EG(scope), ce TSRMLS_CC); - array_init(return_value); zend_hash_internal_pointer_reset_ex(&ce->function_table, &pos); while (zend_hash_get_current_data_ex(&ce->function_table, (void **) &mptr, &pos) == SUCCESS) { if ((mptr->common.fn_flags & ZEND_ACC_PUBLIC) - || (instanceof && ((mptr->common.fn_flags & ZEND_ACC_PROTECTED) || EG(scope) == mptr->common.scope))) { + || (EG(scope) && + (((mptr->common.fn_flags & ZEND_ACC_PROTECTED) && + 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); http://cvs.php.net/co.php/ZendEngine2/tests/bug32296.phpt?r=1.1&p=1 Index: ZendEngine2/tests/bug32296.phpt +++ ZendEngine2/tests/bug32296.phpt

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