mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 18:34:27 +02:00
allow $foo->bar[0] syntax
This commit is contained in:
@@ -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 . ')))*)?\)';
|
||||
|
@@ -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 . ')))*)?\)';
|
||||
|
Reference in New Issue
Block a user