Skip to content

Commit

Permalink
Check if options actually is not empty.
Browse files Browse the repository at this point in the history
  • Loading branch information
bobdenotter authored Oct 6, 2017
1 parent 05b6425 commit b456405
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Twig/TaxonomyListExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ protected function getFullTaxonomy($name = null, $taxonomy = null, $params = nul
if ($rows && ($weighted || $limit)) {
// find the max / min for the results
$named['maxcount'] = 0;
$named['number_of_tags'] = count($named['options']);
$named['number_of_tags'] = !empty($named['options']) ? count($named['options']) : 0;
foreach ($rows as $row) {
if ($row['count']>=$named['maxcount']) {
$named['maxcount']= $row['count'];
Expand Down

0 comments on commit b456405

Please sign in to comment.