Bug #65108 [Csd]: is_callable() triggers Fatal Error
| From: | miloslav dot hula at gmail dot com | Date: | Mon, 24 Jun 2013 18:55:41 +0000 |
| Subject: | Bug #65108 [Csd]: is_callable() triggers Fatal Error | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-179761@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=65108&edit=1
ID: 65108
User updated by: miloslav dot hula at gmail dot com
Reported by: miloslav dot hula at gmail dot com
Summary: is_callable() triggers Fatal Error
Status: Closed
Type: Bug
Package: *General Issues
PHP Version: 5.5Git-2013-06-24 (snap)
Block user comment: N
Private report: N
New Comment:
Thank you for the fix.
Previous Comments:
------------------------------------------------------------------------
[2013-06-24 15:21:58] dsp@php.net
Automatic comment on behalf of dsp
Revision: http://git.php.net/?p=php-src.git;a=commit;h=ecd9d7625098bfc0a14ffa1fc39535848e71fc80
Log: Fix #65108 (is_callable() triggers Fatal Error)
------------------------------------------------------------------------
[2013-06-24 10:01:34] miloslav dot hula at gmail dot com
I'm sorry. I forgot to add the Fatal Error message.
Fatal error: Call to private method C::f() from context '' in /home/milo/fat.php on line 8
------------------------------------------------------------------------
[2013-06-24 09:55:49] miloslav dot hula at gmail dot com
Description:
------------
A Fatal Error is emmited when using is_callable() in static context on class with defined the
__call() method and non-public non-static method simultaneously.
Similar to https://bugs.php.net/bug.php?id=33455.
Test script:
---------------
class C {
private function f() {}
function __call($name, $args) {}
}
$isCallable = is_callable(array('C', 'f'));
Expected result:
----------------
$isCallable is boolean
Actual result:
--------------
Fatal Error
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=65108&edit=1