Skip to content

Commit

Permalink
Merge pull request #23 from bobdenotter/patch-1
Browse files Browse the repository at this point in the history
Check if `options` actually is not empty.
  • Loading branch information
jadwigo authored Oct 9, 2017
2 parents 05b6425 + b456405 commit 2d15948
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 2d15948

Please sign in to comment.