diff --git a/Library/Optimizers/EvalExpression.php b/Library/Optimizers/EvalExpression.php index ab0385f80f..ffcce004f6 100644 --- a/Library/Optimizers/EvalExpression.php +++ b/Library/Optimizers/EvalExpression.php @@ -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 . ')'; } }