- improvement replaced most in_array() calls by more efficient isset() on array_flip()ed haystacks

- added notes on possible performance optimization/problem with Smarty_Security
This commit is contained in:
rodneyrehm
2011-10-01 18:10:48 +00:00
parent 41958a5790
commit aff7c6a0ab
13 changed files with 99 additions and 50 deletions

View File

@@ -52,7 +52,7 @@ function smarty_function_cycle($params, $template)
$advance = (isset($params['advance'])) ? (bool)$params['advance'] : true;
$reset = (isset($params['reset'])) ? (bool)$params['reset'] : false;
if (!in_array('values', array_keys($params))) {
if (!isset($params['values'])) {
if(!isset($cycle_vars[$name]['values'])) {
trigger_error("cycle: missing 'values' parameter");
return;