From 159fbc8377832ff8e931cef0413ee571c494ac84 Mon Sep 17 00:00:00 2001 From: rvelices Date: Tue, 16 Sep 2008 10:17:20 +0000 Subject: - upgrade smarty to latest release 2.6.20 git-svn-id: http://piwigo.org/svn/trunk@2538 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/smarty/libs/Smarty_Compiler.class.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'include/smarty/libs/Smarty_Compiler.class.php') diff --git a/include/smarty/libs/Smarty_Compiler.class.php b/include/smarty/libs/Smarty_Compiler.class.php index d5f877f7b..f09f8de8d 100644 --- a/include/smarty/libs/Smarty_Compiler.class.php +++ b/include/smarty/libs/Smarty_Compiler.class.php @@ -21,12 +21,12 @@ * @link http://smarty.php.net/ * @author Monte Ohrt * @author Andrei Zmievski - * @version 2.6.19 + * @version 2.6.20 * @copyright 2001-2005 New Digital Group, Inc. * @package Smarty */ -/* $Id$ */ +/* $Id: Smarty_Compiler.class.php 2773 2008-08-12 18:17:51Z Uwe.Tews $ */ /** * Template compiling class @@ -1363,9 +1363,14 @@ class Smarty_Compiler extends Smarty { /* If last token was a ')', we operate on the parenthesized expression. The start of the expression is on the stack. Otherwise, we operate on the last encountered token. */ - if ($tokens[$i-1] == ')') + if ($tokens[$i-1] == ')') { $is_arg_start = array_pop($is_arg_stack); - else + if ($is_arg_start != 0) { + if (preg_match('~^' . $this->_func_regexp . '$~', $tokens[$is_arg_start-1])) { + $is_arg_start--; + } + } + } else $is_arg_start = $i-1; /* Construct the argument for 'is' expression, so it knows what to operate on. */ -- cgit v1.2.3