Skip to content

Commit

Permalink
Corrected start:end logic within the template parser
Browse files Browse the repository at this point in the history
  • Loading branch information
kolber committed Apr 13, 2011
1 parent 31d991e commit c44743f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/parsers/template-parser.inc.php
Expand Up @@ -144,7 +144,7 @@ static function parse_foreach($data, $template) {
$pages = (isset($data[$template_parts[2]]) && is_array($data[$template_parts[2]]) && !empty($data[$template_parts[2]])) ? $data[$template_parts[2]] : false;

# slice down the data array if required
if(is_array($pages) && $start_limit !== false) {
if(is_array($pages) && isset($start_limit)) {
$pages = array_slice($pages, $start_limit, $end_limit);
}

Expand Down

0 comments on commit c44743f

Please sign in to comment.