php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #75220 is_callable crash for 'parent'
Submitted: 2017-09-18 07:14 UTC Modified: -
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: maybeonly at gmail dot com Assigned:
Status: Closed Package: Reproducible crash
PHP Version: 7.1.9 OS: centos 7/fedora 26
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: maybeonly at gmail dot com
New email:
PHP Version: OS:

 

 [2017-09-18 07:14 UTC] 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

Patches

Pull Requests

Pull requests:

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-09-18 08:22 UTC] andrew dot nester dot dev at gmail dot com
Thanks for pointing this issue! I've just sent PR fixing this.
 [2017-09-27 05:09 UTC] krakjoe@php.net
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
 [2017-09-27 05:09 UTC] krakjoe@php.net
-Status: Open +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 12:01:29 2024 UTC