mirror of
https://github.com/smarty-php/smarty.git
synced 2026-04-21 00:48:47 +02:00
- 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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user