cvs: ZendEngine2 / zend_API.c /tests bug34678.phpt
| From: | Dmitry Stogov | Date: | Mon, 03 Oct 2005 09:10:30 +0000 |
| Subject: | cvs: ZendEngine2 / zend_API.c /tests bug34678.phpt | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-4188@lists.php.net to get a copy of this message | ||
dmitry Mon Oct 3 05:10:30 2005 EDT
Added files:
/ZendEngine2/tests bug34678.phpt
Modified files:
/ZendEngine2 zend_API.c
Log:
Fixed bug #34678 (__call(), is_callable() and static methods)
http://cvs.php.net/diff.php/ZendEngine2/zend_API.c?r1=1.316&r2=1.317&ty=u
Index: ZendEngine2/zend_API.c
diff -u ZendEngine2/zend_API.c:1.316 ZendEngine2/zend_API.c:1.317
--- ZendEngine2/zend_API.c:1.316 Tue Sep 27 03:58:59 2005
+++ ZendEngine2/zend_API.c Mon Oct 3 05:10:24 2005
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_API.c,v 1.316 2005/09/27 07:58:59 dmitry Exp $ */
+/* $Id: zend_API.c,v 1.317 2005/10/03 09:10:24 dmitry Exp $ */
#include "zend.h"
#include "zend_execute.h"
@@ -2726,7 +2726,7 @@
}
}
/* check for __call too */
- if (retval == 0 && ce->__call != 0) {
+ if (retval == 0 && *zobj_ptr_ptr && 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