Skip to content

Commit

Permalink
Fixing #401
Browse files Browse the repository at this point in the history
  • Loading branch information
andresgutierrez committed Oct 24, 2014
1 parent fe25f1b commit 73b3319
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Library/Optimizers/EvalExpression.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ public function optimizeNot($expr, $compilationContext)
if ($expr['type'] == 'not') {
$conditions = $this->optimize($expr['left'], $compilationContext);
if ($conditions !== false) {
if ($this->_unreachable !== null) {
$this->_unreachable = !$this->_unreachable;
$this->_unreachableElse = !$this->_unreachableElse;
}
return '!(' . $conditions . ')';
}
}
Expand Down

0 comments on commit 73b3319

Please sign in to comment.