File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -177,7 +177,7 @@ function (array $matches) use ($variables): string {
177177
178178 $ orBranches = [];
179179 foreach (explode (' or ' , $ matches ['condition ' ]) as $ orLinkedCondition ) {
180- $ andBranches = [] ;
180+ $ andBranchTrue = true ;
181181
182182 foreach (explode (' and ' , $ orLinkedCondition ) as $ condition ) {
183183 if (!preg_match (
@@ -188,11 +188,12 @@ function (array $matches) use ($variables): string {
188188 throw new SyntaxErrorException ("Invalid condition {$ matches ['condition ' ]}" );
189189 }
190190
191- $ andBranches [] = (
192- !empty ($ conditionMatches ['not ' ]) xor $ this ->getValue ($ conditionMatches , $ variables )
193- );
191+ if (empty ($ conditionMatches ['not ' ]) xor $ this ->getValue ($ conditionMatches , $ variables )) {
192+ $ andBranchTrue = false ;
193+ break ;
194+ }
194195 }
195- $ orBranches [] = ! in_array ( false , $ andBranches ) ;
196+ $ orBranches [] = $ andBranchTrue ;
196197 }
197198
198199 if (in_array (true , $ orBranches )) {
You can’t perform that action at this time.
0 commit comments