Install Weblinks 3.6.0 Package from https://extensions.joomla.org/extensions/extension/official-extensions/weblinks/ on Joomla 3.9.0 using PHP 7.2 and set to report PHP warnings.
Go to Components - Web Links and add any URL as New Web Link to the existing default category Uncategorised with default options, Save & Close.
Create a new menu item and select Web Links - List All Web Link Categories with default options, Save & Close.
Go to the front end and select the new link from the menu.
The list shows the default category Uncategorised.
The list shows the category Uncategorised after the PHP warning:
Warning: count(): Parameter must be an array or an object that implements Countable in C:\www\joomla380\components\com_weblinks\models\categories.php on line 95
Joomla 3.9.0 and also Joomla 3.9.0 updated with Joomla_3.9.1-dev-Development-Update_Package.zip
PHP 7.2.11
Fixed by inserting the following lines before line 95 in components/com_weblinks/models/categories.php
if (!is_array($this->_items)) { $this->_items = array(); }
Ref. topic "Weblinks Categories page - Warning: count() at https://forum.joomla.org/viewtopic.php?f=715&t=967481
Yes - but it was my fault - I have mixed up different issues.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-08-18 07:52:19 |
Closed_By | ⇒ | joomdonation |
This issue was fixed in latest codebase, so I'm closing.
The issue is caused by a defective query.
Change the lines 153 - 154 by
$query->select('CASE WHEN a.created_by_alias != "" THEN a.created_by_alias ELSE ua.name END AS author')
->select('ua.email', 'author_email')
And the $item is not empty.