com php-src: Fixed bug #73303: NEWS Zend/zend_execute_API .c ext/standard/tests/assert/bug73303.phpt
| From: | Nikita Popov | Date: | Fri, 18 Nov 2016 20:41:43 +0000 |
| Subject: | com php-src: Fixed bug #73303: NEWS Zend/zend_execute_API .c ext/standard/tests/assert/bug73303.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-95879@lists.php.net to get a copy of this message | ||
Commit: 8bb39572704a480c929a9f4d52aa4bfd26fed1b2
Author: Nikita Popov <nikic@php.net> Fri, 18 Nov 2016 21:41:10 +0100
Parents: 828f866e47808749e1033a76d99fa6ecb2d87a65
Branches: PHP-7.1 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=8bb39572704a480c929a9f4d52aa4bfd26fed1b2
Log:
Fixed bug #73303
Bugs:
https://bugs.php.net/73303
Changed paths:
M NEWS
M Zend/zend_execute_API.c
A ext/standard/tests/assert/bug73303.phpt
Diff:
diff --git a/NEWS b/NEWS
index cc0c486..f677e80 100644
--- a/NEWS
+++ b/NEWS
@@ -16,9 +16,9 @@ PHP NEWS
- Mbstring:
. Fixed bug #73532 (Null pointer dereference in mb_eregi). (Laruence)
-- Mysqlnd:
- . Fixed bug #64526 (Add missing mysqlnd.* parameters to php.ini-*). (cmb)
-
+- Mysqlnd:
+ . Fixed bug #64526 (Add missing mysqlnd.* parameters to php.ini-*). (cmb)
+
- Opcache:
. Fixed bug #69090 (check cached files permissions)
@@ -27,8 +27,9 @@ PHP NEWS
. Fixed bug #73530 (Unsetting result set may reset other result set). (cmb)
- Standard:
- . Fixed bug #73297 (HTTP stream wrapper should ignore HTTP 100 Continue).
- (rowan dot collins at gmail dot com)
+ . Fixed bug #73297 (HTTP stream wrapper should ignore HTTP 100 Continue).
+ (rowan dot collins at gmail dot com)
+ . Fixed bug #73303 (Scope not inherited by eval in assert()). (nikic)
- XML:
. Fixed bug #72135 (malformed XML causes fault) (edgarsandi)
@@ -36,7 +37,7 @@ PHP NEWS
10 Nov 2016, PHP 7.1.0RC6
- Core:
- . Fixded bug #72736 (Slow performance when fetching large dataset with mysqli
+ . Fixed bug #72736 (Slow performance when fetching large dataset with mysqli
/ PDO). (Dmitry)
. Fixed bug #72482 (Ilegal write/read access caused by gdImageAALine
overflow). (cmb)
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c
index fc4a39a..cba929a 100644
--- a/Zend/zend_execute_API.c
+++ b/Zend/zend_execute_API.c
@@ -1086,6 +1086,8 @@ ZEND_API int zend_eval_stringl(char *str, size_t str_len, zval *retval_ptr,
char
EG(no_extensions)=1;
+ new_op_array->scope = zend_get_executed_scope();
+
zend_try {
ZVAL_UNDEF(&local_retval);
zend_execute(new_op_array, &local_retval);
diff --git a/ext/standard/tests/assert/bug73303.phpt b/ext/standard/tests/assert/bug73303.phpt
new file mode 100644
index 0000000..57990ab
--- /dev/null
+++ b/ext/standard/tests/assert/bug73303.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Bug #73303: Scope not inherited by eval in assert()
+--FILE--
+<?php
+
+class Test {
+ public $prop;
+
+ public function main(){
+ assert('self::checkCacheKey(get_object_vars($this))');
+ echo 'Success';
+ }
+ private static function checkCacheKey($obj_properties){
+ return count($obj_properties) == 1;
+ }
+}
+
+$obj = new Test();
+$obj->main();
+
+?>
+--EXPECT--
+Success