diff options
author | Nikita Popov <nikic@php.net> | 2015-10-09 23:28:24 +0200 |
---|---|---|
committer | Nikita Popov <nikic@php.net> | 2015-10-09 23:28:24 +0200 |
commit | e19423f3cbeaf2ac57a4af1e7c5b84fc6721177b (patch) | |
tree | 87600a8ba2b117c7a91dbdc967eead975e844388 /Zend/tests/bug70681.phpt | |
parent | bbae7ddf29192af25a3a776dfc52508c162d2ea6 (diff) | |
download | php-git-e19423f3cbeaf2ac57a4af1e7c5b84fc6721177b.tar.gz |
Improve previous fix
Don't forbid null binding on plain functions.
Diffstat (limited to 'Zend/tests/bug70681.phpt')
-rw-r--r-- | Zend/tests/bug70681.phpt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Zend/tests/bug70681.phpt b/Zend/tests/bug70681.phpt index a99180b0ce..9dd09b07b8 100644 --- a/Zend/tests/bug70681.phpt +++ b/Zend/tests/bug70681.phpt @@ -6,6 +6,11 @@ Bug #70681: Segfault when binding $this of internal instance method to null $c = (new ReflectionMethod('SplStack', 'count'))->getClosure(new SplStack); $c = $c->bindTo(null); +$c = (new ReflectionFunction('strlen'))->getClosure(); +$c = $c->bindTo(null); +var_dump($c("foo")); + ?> --EXPECTF-- Warning: Cannot unbind $this of internal method in %s on line %d +int(3) |