From 2d6d972bf5ec193ac5ba26a22493f582e47f789e Mon Sep 17 00:00:00 2001 From: mohrt Date: Tue, 18 Feb 2003 18:08:05 +0000 Subject: [PATCH] allow $foo->bar[0] syntax --- Smarty_Compiler.class.php | 2 +- libs/Smarty_Compiler.class.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Smarty_Compiler.class.php b/Smarty_Compiler.class.php index cc764c91..c69e42d7 100644 --- a/Smarty_Compiler.class.php +++ b/Smarty_Compiler.class.php @@ -139,7 +139,7 @@ class Smarty_Compiler extends Smarty { // $foo->bar($foo, "foo") // $foo->bar->foo() // $foo->bar->foo->bar() - $this->_obj_ext_regexp = '\->(?:\w+|' . $this->_dvar_regexp . ')'; + $this->_obj_ext_regexp = '\->(?:\w+|\$?' . $this->_dvar_guts_regexp . ')'; $this->_obj_params_regexp = '\((?:\w+|' . $this->_var_regexp . '(?:\s*,\s*(?:(?:\w+|' . $this->_var_regexp . ')))*)?\)'; diff --git a/libs/Smarty_Compiler.class.php b/libs/Smarty_Compiler.class.php index cc764c91..c69e42d7 100644 --- a/libs/Smarty_Compiler.class.php +++ b/libs/Smarty_Compiler.class.php @@ -139,7 +139,7 @@ class Smarty_Compiler extends Smarty { // $foo->bar($foo, "foo") // $foo->bar->foo() // $foo->bar->foo->bar() - $this->_obj_ext_regexp = '\->(?:\w+|' . $this->_dvar_regexp . ')'; + $this->_obj_ext_regexp = '\->(?:\w+|\$?' . $this->_dvar_guts_regexp . ')'; $this->_obj_params_regexp = '\((?:\w+|' . $this->_var_regexp . '(?:\s*,\s*(?:(?:\w+|' . $this->_var_regexp . ')))*)?\)';