diff --git a/src/Twig/TaxonomyListExtension.php b/src/Twig/TaxonomyListExtension.php index 937b8e0..6722b07 100644 --- a/src/Twig/TaxonomyListExtension.php +++ b/src/Twig/TaxonomyListExtension.php @@ -202,15 +202,19 @@ protected function getFullTaxonomy($name = null, $taxonomy = null, $params = nul } else { $row['weightclass'] = 'xl'; } - - $populatedrows[$row['slug']] = $row; + + if ($row['slug']) { + $populatedrows[$row['slug']] = $row; + } } $named['options'] = $populatedrows; } elseif ($rows) { // return all rows - so add the count to all existing rows // weight is useless here foreach ($rows as $row) { - $named['options'][$row['slug']] = $row; + if ($row['slug']) { + $named['options'][$row['slug']] = $row; + } } }