diff --git a/components/com_tags/views/tag/view.html.php b/components/com_tags/views/tag/view.html.php index 63ee09b3b575e..2c0538ab84bb1 100644 --- a/components/com_tags/views/tag/view.html.php +++ b/components/com_tags/views/tag/view.html.php @@ -116,8 +116,7 @@ public function display($tpl = null) } // Categories store the images differently so lets re-map it so the display is correct - $count = count($items); - if ($count > 0 && $items[0]->type_alias === 'com_content.category') + if ($items && $items[0]->type_alias === 'com_content.category') { foreach ($items as $row) {