cvs: ZendEngine2(PHP_5_0) / zend_API.c /tests bug34678.phpt php-src NEWS

From: Date: Mon, 03 Oct 2005 09:14:00 +0000
Subject: cvs: ZendEngine2(PHP_5_0) / zend_API.c /tests bug34678.phpt php-src NEWS
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-4190@lists.php.net to get a copy of this message
dmitry Mon Oct 3 05:14:00 2005 EDT Added files: (Branch: PHP_5_0) /ZendEngine2/tests bug34678.phpt Modified files: /php-src NEWS /ZendEngine2 zend_API.c Log: Fixed bug #34678 (__call(), is_callable() and static methods) http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1760.2.487&r2=1.1760.2.488&ty=u Index: php-src/NEWS diff -u php-src/NEWS:1.1760.2.487 php-src/NEWS:1.1760.2.488 --- php-src/NEWS:1.1760.2.487 Wed Sep 28 07:25:36 2005 +++ php-src/NEWS Mon Oct 3 05:13:58 2005 @@ -2,6 +2,7 @@ ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? ????, PHP 5.0.6 - Renamed CachingRecursiveIterator to RecursiveCachingIterator. (Marcus) +- Fixed bug #34678 (__call(), is_callable() and static methods). (Dmitry) - Fixed bug #34643 (wsdl default value has no effect). (Dmitry) - Fixed bug #34617 (zend_deactivate: objects_store used after zend_objects_store_destroy is called). (Dmitry) http://cvs.php.net/diff.php/ZendEngine2/zend_API.c?r1=1.256.2.18&r2=1.256.2.19&ty=u Index: ZendEngine2/zend_API.c diff -u ZendEngine2/zend_API.c:1.256.2.18 ZendEngine2/zend_API.c:1.256.2.19 --- ZendEngine2/zend_API.c:1.256.2.18 Mon Jul 25 16:26:49 2005 +++ ZendEngine2/zend_API.c Mon Oct 3 05:13:59 2005 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_API.c,v 1.256.2.18 2005/07/25 20:26:49 helly Exp $ */ +/* $Id: zend_API.c,v 1.256.2.19 2005/10/03 09:13:59 dmitry Exp $ */ #include "zend.h" #include "zend_execute.h" @@ -1762,6 +1762,7 @@ { char *lcname; zend_bool retval = 0; + zval **obj = NULL; TSRMLS_FETCH(); switch (Z_TYPE_P(callable)) { @@ -1783,7 +1784,6 @@ case IS_ARRAY: { zval **method; - zval **obj; zend_class_entry *ce = NULL, **pce; zend_uint callable_name_len; @@ -1858,7 +1858,7 @@ } } /* check for __call too */ - if (retval == 0 && ce->__call != 0) { + if (retval == 0 && obj && Z_TYPE_PP(obj) == IS_OBJECT && ce->__call != 0) { retval = 1; } efree(lcname); http://cvs.php.net/co.php/ZendEngine2/tests/bug34678.phpt?r=1.1&p=1 Index: ZendEngine2/tests/bug34678.phpt +++ ZendEngine2/tests/bug34678.phpt --TEST-- Bug #34678 (__call(), is_callable() and static methods) --FILE-- <?php class A { public function __call($m, $a) { echo "__call\n"; } } class B extends A { public static function foo() { echo "foo\n"; } } if (is_callable(array('B', 'foo'))) { call_user_func(array('B', 'foo')); } if (is_callable(array('A', 'foo'))) { call_user_func(array('A', 'foo')); } ?> --EXPECT-- foo

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