Fix #144: forgot prepend unary operator

This commit is contained in:
bzick 2015-02-02 11:49:42 +03:00
parent 5d87060f42
commit 89f2e23750

View File

@ -780,7 +780,7 @@ class Template extends Render
if ($this->_options & Fenom::DENY_METHODS) { if ($this->_options & Fenom::DENY_METHODS) {
throw new \LogicException("Forbidden to call methods"); throw new \LogicException("Forbidden to call methods");
} }
return $this->parseChain($tokens, $code); return $unary . $this->parseChain($tokens, $code);
} elseif ($tokens->is(Tokenizer::MACRO_INCDEC)) { } elseif ($tokens->is(Tokenizer::MACRO_INCDEC)) {
if($this->_options & Fenom::FORCE_VERIFY) { if($this->_options & Fenom::FORCE_VERIFY) {
return $unary . '(isset(' . $code . ') ? ' . $code . $tokens->getAndNext() . ' : null)'; return $unary . '(isset(' . $code . ') ? ' . $code . $tokens->getAndNext() . ' : null)';