com php-src: Merge branch 'PHP-7.4': Zend/zend_closures.c Zend/zend_compile.c Zend/zend_compile.h

From: Date: Fri, 23 Aug 2019 15:23:31 +0000
Subject: com php-src: Merge branch 'PHP-7.4': Zend/zend_closures.c Zend/zend_compile.c Zend/zend_compile.h
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-108017@lists.php.net to get a copy of this message
Commit: 4e4cc9b480f7e06989f3c1e4685ccd2275f016b3 Author: Nikita Popov <nikita.ppv@gmail.com> Fri, 23 Aug 2019 17:23:31 +0200 Parents: 51ea7fc4775bad00f332c0c8b0c54be7c60ab2ed d1157cbce1f324362d1fe05aff3fb53ef248ad74 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=4e4cc9b480f7e06989f3c1e4685ccd2275f016b3 Log: Merge branch 'PHP-7.4' Changed paths: MM Zend/zend_closures..c MM Zend/zend_compile.c MM Zend/zend_compile.h Diff: diff --cc Zend/zend_closures.c index 9970a3b,df6516a..ed2a61e --- a/Zend/zend_closures.c +++ b/Zend/zend_closures.c @@@ -84,9 -84,14 +84,10 @@@ static zend_bool zend_valid_closure_bin } } else if (is_fake_closure && func->common.scope && !(func->common.fn_flags & ZEND_ACC_STATIC)) { - if (func->type == ZEND_INTERNAL_FUNCTION) { - zend_error(E_WARNING, "Cannot unbind $this of internal method"); - return 0; - } else { - zend_error(E_DEPRECATED, "Unbinding $this of a method is deprecated"); - } + zend_error(E_WARNING, "Cannot unbind $this of method"); + return 0; - } else if (!is_fake_closure && !Z_ISUNDEF(closure->this_ptr)) { + } else if (!is_fake_closure && !Z_ISUNDEF(closure->this_ptr) + && (func->common.fn_flags & ZEND_ACC_USES_THIS)) { // TODO: Only deprecate if it had $this *originally*? zend_error(E_DEPRECATED, "Unbinding $this of closure is deprecated"); }

« previous php.cvs (#108017) next »