com php-src: Merge branch 'PHP-5.6' into PHP-7.0: NEWS Zend/zend_closures.c

From: Date: Fri, 09 Oct 2015 21:06:32 +0000
Subject: com php-src: Merge branch 'PHP-5.6' into PHP-7.0: NEWS Zend/zend_closures.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-89347@lists.php.net to get a copy of this message
Commit: f6ae19f15824104e8d90c4b364cc42e960f059fd Author: Nikita Popov <nikic@php.net> Fri, 9 Oct 2015 23:05:49 +0200 Parents: be09d1c262aa840658aebc0e622fbd1f62d0c12d bbae7ddf29192af25a3a776dfc52508c162d2ea6 Branches: PHP-7.0 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f6ae19f15824104e8d90c4b364cc42e960f059fd Log: Merge branch 'PHP-5.6' into PHP-7.0 Changed paths: MM NEWS MM Zend/zend_closures.c Diff: diff --cc NEWS index 5cf236f,90369eb..4d2b9ba --- a/NEWS +++ b/NEWS @@@ -1,13 -1,14 +1,15 @@@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| -?? ??? 2015, PHP 5.6.15 +15 Oct 2015, PHP 7.0.0 RC 5 - Core: - . Fixed bug #70681 (Segfault when binding $this of internal instance method + . Fixed bug #70630 (Closure::call/bind() crash with ReflectionFunction-> + getClosure()). (Dmitry, Bob) + . Fixed bug #70662 (Duplicate array key via undefined index error handler). + (Nikita) ++ . Fixed buf #70681 (Segfault when binding $this of internal instance method + to null). (Nikita) -- Date: - . Fixed bug #70619 (DateTimeImmutable segfault). (Laruence) - - Mcrypt: . Fixed bug #70625 (mcrypt_encrypt() won't return data when no IV was specified under RC4). (Nikita) diff --cc Zend/zend_closures.c index 4430e7b,772eb12..6631193 --- a/Zend/zend_closures.c +++ b/Zend/zend_closures.c @@@ -173,8 -88,14 +173,14 @@@ ZEND_METHOD(Closure, bind zend_error(E_WARNING, "Cannot bind an instance to a static closure"); } + if (newthis == NULL && !(closure->func.common.fn_flags & ZEND_ACC_STATIC) + && closure->func.type == ZEND_INTERNAL_FUNCTION) { + zend_error(E_WARNING, "Cannot unbind $this of internal method"); + return; + } + if (scope_arg != NULL) { /* scope argument was given */ - if (IS_ZEND_STD_OBJECT(*scope_arg)) { + if (Z_TYPE_P(scope_arg) == IS_OBJECT) { ce = Z_OBJCE_P(scope_arg); } else if (Z_TYPE_P(scope_arg) == IS_NULL) { ce = NULL;

« previous php.cvs (#89347) next »