com php-src: Allow only simple variables with global keyword: Zend/zend_language_parser.y
| From: | Nikita Popov | Date: | Wed, 04 Jun 2014 15:15:16 +0000 |
| Subject: | com php-src: Allow only simple variables with global keyword: Zend/zend_language_parser.y | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-81060@lists.php.net to get a copy of this message | ||
Commit: e4e42df4e6fc99bc05d243978146fb0b6e5b4085
Author: Nikita Popov <nikic@php.net> Wed, 4 Jun 2014 17:15:16 +0200
Parents: f4a11b66cc54995cfe7c25ea34e8f1948ed7a055
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=e4e42df4e6fc99bc05d243978146fb0b6e5b4085
Log:
Allow only simple variables with global keyword
Changed paths:
M Zend/zend_language_parser.y
Diff:
diff --git a/Zend/zend_language_parser.y b/Zend/zend_language_parser.y
index 6eb2c42..e28949d 100644
--- a/Zend/zend_language_parser.y
+++ b/Zend/zend_language_parser.y
@@ -597,15 +597,12 @@ function_call_parameter:
;
global_var_list:
- global_var_list ',' global_var { zend_do_fetch_global_variable(&$3, NULL,
ZEND_FETCH_GLOBAL_LOCK TSRMLS_CC); }
- | global_var { zend_do_fetch_global_variable(&$1, NULL, ZEND_FETCH_GLOBAL_LOCK
TSRMLS_CC); }
+ global_var_list ',' global_var
+ | global_var
;
-
global_var:
- T_VARIABLE { $$ = $1; }
- | '$' r_variable { $$ = $2; }
- | '$' '{' expr '}' { $$ = $3; }
+ simple_variable { zend_do_fetch_global_variable(&$1, NULL, ZEND_FETCH_GLOBAL_LOCK TSRMLS_CC);
}
;