]> granicus.if.org Git - php/commit
Forbid binding methods to incompatible $this
authorNikita Popov <nikic@php.net>
Tue, 29 Mar 2016 21:48:07 +0000 (23:48 +0200)
committerNikita Popov <nikic@php.net>
Thu, 7 Apr 2016 22:38:44 +0000 (00:38 +0200)
commit75af8150f58fb55637ac12b33d469b27adef9d76
tree682e004586b35e5ecb368a6f29e082779d15cd42
parentaed42496534fe54c5c0ce64fe0ca5c9d801d6161
Forbid binding methods to incompatible $this

This prohibits binding closures returned by
ReflectionMethod::getClosure() to a $this, which is not an
instance of the method scope. This restriction was already in
place for internal methods, now it is extended to user methods.

ML discussion: http://markmail.org/message/zepnhdyr3kij6di6
Zend/tests/bug70685.phpt
Zend/tests/closure_061.phpt
Zend/zend_closures.c