mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 10:24:26 +02:00
allow section-, array- and object-dereference in $smarty-references
This commit is contained in:
@@ -1864,9 +1864,8 @@ class Smarty_Compiler extends Smarty {
|
||||
{
|
||||
/* Extract the reference name. */
|
||||
$_ref = substr($indexes[0], 1);
|
||||
|
||||
foreach($indexes as $_index) {
|
||||
if ($_index{0} != '.') {
|
||||
foreach($indexes as $_index_no=>$_index) {
|
||||
if ($_index{0} != '.' && $_index_no<2 || !preg_match('!^(\.|\[|->)!', $_index)) {
|
||||
$this->_syntax_error('$smarty' . implode('', array_slice($indexes, 0, 2)) . ' is an invalid reference', E_USER_ERROR, __FILE__, __LINE__);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user