2015-10-10 12:54:14 +00:00
|
|
|
--TEST--
|
|
|
|
Bug #70685: Segfault for getClosure() internal method rebind with invalid $this
|
|
|
|
--FILE--
|
|
|
|
<?php
|
|
|
|
|
|
|
|
class cls {}
|
|
|
|
|
|
|
|
$c = (new ReflectionMethod('SplStack', 'count'))->getClosure(new SplStack);
|
|
|
|
$c = $c->bindTo(new cls);
|
|
|
|
var_dump($c);
|
|
|
|
|
|
|
|
$c = (new ReflectionMethod('SplStack', 'count'))->getClosure(new SplStack);
|
|
|
|
$c = $c->bindTo(new SplStack, 'cls');
|
|
|
|
var_dump($c);
|
|
|
|
|
|
|
|
?>
|
|
|
|
--EXPECTF--
|
2016-03-29 21:48:07 +00:00
|
|
|
Warning: Cannot bind method SplDoublyLinkedList::count() to object of class cls in %s on line %d
|
2015-10-10 12:54:14 +00:00
|
|
|
NULL
|
|
|
|
|
2015-10-09 21:38:25 +00:00
|
|
|
Warning: Cannot rebind scope of closure created by ReflectionFunctionAbstract::getClosure() in %s on line %d
|
2015-10-10 12:54:14 +00:00
|
|
|
NULL
|