mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 18:34:27 +02:00
- bugfix compiling super globals like {$smarty.get.foo} did fail in the master branch https://github.com/smarty-php/smarty/issues/77
This commit is contained in:
@@ -14,7 +14,8 @@
|
|||||||
- optimize use_include_path processing
|
- optimize use_include_path processing
|
||||||
- relocate properties for size optimization
|
- relocate properties for size optimization
|
||||||
- remove redundant code
|
- remove redundant code
|
||||||
|
- bugfix compiling super globals like {$smarty.get.foo} did fail in the master branch https://github.com/smarty-php/smarty/issues/77
|
||||||
|
|
||||||
06.08.2015
|
06.08.2015
|
||||||
- avoid possible circular object references caused by parser/lexer objects
|
- avoid possible circular object references caused by parser/lexer objects
|
||||||
- rewrite compileAll... utility methods
|
- rewrite compileAll... utility methods
|
||||||
|
@@ -67,7 +67,8 @@ class Smarty_Internal_Compile_Private_Special_Variable extends Smarty_Internal_C
|
|||||||
$compiler->trigger_template_error("(secure mode) super globals not permitted");
|
$compiler->trigger_template_error("(secure mode) super globals not permitted");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return '$_' . strtoupper($variable);
|
$compiled_ref = '$_' . strtoupper($variable);
|
||||||
|
break;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'template':
|
case 'template':
|
||||||
@@ -117,7 +118,13 @@ class Smarty_Internal_Compile_Private_Special_Variable extends Smarty_Internal_C
|
|||||||
$compiler->trigger_template_error('$smarty.' . trim($_index[0], "'") . ' is invalid');
|
$compiler->trigger_template_error('$smarty.' . trim($_index[0], "'") . ' is invalid');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if (isset($_index[1])) {
|
||||||
|
array_shift($_index);
|
||||||
|
foreach ($_index as $_ind) {
|
||||||
|
$compiled_ref = $compiled_ref . "[$_ind]";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $compiled_ref;
|
||||||
}
|
}
|
||||||
return '';
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user