Bug #75220 [Opn->Csd]: is_callable crash for 'parent'
| From: | krakjoe@php.net | Date: | Wed, 27 Sep 2017 05:09:58 +0000 |
| Subject: | Bug #75220 [Opn->Csd]: is_callable crash for 'parent' | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-211374@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
Updated by: krakjoe@php.net
Reported by: maybeonly at gmail dot com
Summary: is_callable crash for 'parent'
-Status: Open
+Status: Closed
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:
Automatic comment on behalf of andrew.nester.dev@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=a680d701cece7d8c5d2b8aa1ce14bae4058b20da
Log: Fixed #75220 - Segfault when calling is_callable on parent
Previous Comments:
------------------------------------------------------------------------
[2017-09-18 08:22:52] andrew dot nester dot dev at gmail dot com
Thanks for pointing this issue! I've just sent PR fixing this.
------------------------------------------------------------------------
[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