Bug #75220 [Com]: is_callable crash for 'parent'
| From: | andrew dot nester dot dev at gmail dot com | Date: | Mon, 18 Sep 2017 08:22:55 +0000 |
| Subject: | Bug #75220 [Com]: is_callable crash for 'parent' | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-211201@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=75220&edit=1
ID: 75220
Comment by: andrew dot nester dot dev at gmail dot com
Reported by: maybeonly at gmail dot com
Summary: is_callable crash for 'parent'
Status: Open
Type: Bug
Package: Reproducible crash
Operating System: centos 7/fedora 26
PHP Version: 7.1.9
Block user comment: N
Private report: N
New Comment:
Thanks for pointing this issue! I've just sent PR fixing this.
Previous Comments:
------------------------------------------------------------------------
[2017-09-18 07:14:45] maybeonly at gmail dot com
Description:
------------
Please see code below.
It also crashes in php 7.0.23.
Test script:
---------------
$a = new A();
$a->bar('foo');
class B {};
class A extends B
{
function bar($func)
{
var_dump('foo'); #ok
var_dump(is_callable('parent::foo')); #ok
var_dump(is_callable(array('parent', 'foo'))); #crash
}
function __call($func, $args)
{
//if this function does not exist, it won't crash
}
};
Expected result:
----------------
string(3) "foo"
bool(false)
bool(false)
Actual result:
--------------
crashed
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=75220&edit=1