mirror of
https://github.com/php/php-src.git
synced 2026-04-03 22:22:18 +02:00
Merge branch 'PHP-7.0'
This commit is contained in:
22
Zend/tests/bug70685.phpt
Normal file
22
Zend/tests/bug70685.phpt
Normal file
@@ -0,0 +1,22 @@
|
||||
--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--
|
||||
Warning: Cannot bind internal method SplDoublyLinkedList::count() to object of class cls in %s on line %d
|
||||
NULL
|
||||
|
||||
Warning: Cannot bind function SplDoublyLinkedList::count to scope class cls in %s on line %d
|
||||
NULL
|
||||
Reference in New Issue
Block a user