@@ -168,7 +168,9 @@ public function process($tokens) {
168168 }
169169
170170 if (!$ curr ->getSubTree ()) {
171- $ curr ->setSubTree ($ localExprList );
171+ if (!empty ($ localExprList )) {
172+ $ curr ->setSubTree ($ localExprList );
173+ }
172174 } else {
173175 $ tmpExprList = $ curr ->getSubTree ();
174176 $ curr ->setSubTree (array_merge ($ tmpExprList , $ localExprList ));
@@ -191,7 +193,9 @@ public function process($tokens) {
191193 }
192194
193195 if (!$ curr ->getSubTree ()) {
194- $ curr ->setSubTree ($ localExprList );
196+ if (!empty ($ localExprList )) {
197+ $ curr ->setSubTree ($ localExprList );
198+ }
195199 } else {
196200 $ tmpExprList = $ curr ->getSubTree ();
197201 $ curr ->setSubTree (array_merge ($ tmpExprList , $ localExprList ));
@@ -237,7 +241,9 @@ public function process($tokens) {
237241 }
238242
239243 if (!$ curr ->getSubTree ()) {
240- $ curr ->setSubTree ($ localExprList );
244+ if (!empty ($ localExprList )) {
245+ $ curr ->setSubTree ($ localExprList );
246+ }
241247 } else {
242248 $ tmpExprList = $ curr ->getSubTree ();
243249 $ curr ->setSubTree (array_merge ($ tmpExprList , $ localExprList ));
@@ -253,7 +259,9 @@ public function process($tokens) {
253259
254260 $ curr ->setTokenType (ExpressionType::BRACKET_EXPRESSION );
255261 if (!$ curr ->getSubTree ()) {
256- $ curr ->setSubTree ($ localExprList );
262+ if (!empty ($ localExprList )) {
263+ $ curr ->setSubTree ($ localExprList );
264+ }
257265 } else {
258266 $ tmpExprList = $ curr ->getSubTree ();
259267 $ curr ->setSubTree (array_merge ($ tmpExprList , $ localExprList ));
0 commit comments