diff --git a/NEWS b/NEWS index db218c490b4..19e4f2a646b 100644 --- a/NEWS +++ b/NEWS @@ -40,6 +40,7 @@ PHP NEWS - Fixed "make test" to work for phpized extensions. (Hartmut, Jani) - Fixed failing queries (FALSE returned) with mysqli_query() on 64 bit systems. (Andrey) +- Fixed bug #34678 (__call(), is_callable() and static methods). (Dmitry) - Fixed bug #34645 (ctype corrupts memory when validating large numbers). (Ilia) - Fixed bug #34643 (wsdl default value has no effect). (Dmitry) - Fixed bug #34617 (zend_deactivate: objects_store used after diff --git a/Zend/tests/bug34678.phpt b/Zend/tests/bug34678.phpt new file mode 100755 index 00000000000..2a13201f265 --- /dev/null +++ b/Zend/tests/bug34678.phpt @@ -0,0 +1,25 @@ +--TEST-- +Bug #34678 (__call(), is_callable() and static methods) +--FILE-- + +--EXPECT-- +foo diff --git a/Zend/zend_API.c b/Zend/zend_API.c index 8be11c71f79..63df1b60b73 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -2068,7 +2068,7 @@ ZEND_API zend_bool zend_is_callable_ex(zval *callable, uint check_flags, char ** } } /* check for __call too */ - if (retval == 0 && ce->__call != 0) { + if (retval == 0 && *zobj_ptr_ptr && ce->__call != 0) { retval = 1; } efree(lcname);