From 406a148673862b96d6eda72119a97c355e058ed2 Mon Sep 17 00:00:00 2001 From: mohrt Date: Fri, 2 May 2003 19:05:21 +0000 Subject: [PATCH] allow math on negative number --- libs/Smarty_Compiler.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/Smarty_Compiler.class.php b/libs/Smarty_Compiler.class.php index 3cd05980..60a60eb7 100644 --- a/libs/Smarty_Compiler.class.php +++ b/libs/Smarty_Compiler.class.php @@ -112,7 +112,7 @@ class Smarty_Compiler extends Smarty { // $foo[5][blah] // $foo[5].bar[$foobar][4] $this->_dvar_guts_regexp = '\w+(?:' . $this->_var_bracket_regexp - . ')*(?:\.\$?\w+(?:' . $this->_var_bracket_regexp . ')*)*(?:\+\+|\-\-|(?:[\+\-\*\/]\d+(?:\.\d+)?))?'; + . ')*(?:\.\$?\w+(?:' . $this->_var_bracket_regexp . ')*)*(?:\+\+|\-\-|(?:[\+\-\*\/]\-?\d+(?:\.\d+)?))?'; $this->_dvar_regexp = '\$' . $this->_dvar_guts_regexp; // matches config vars: