joomla-extensions / weblinks

This repo is meant to hold the decoupled com_weblinks component and related code.
GNU General Public License v2.0
45 stars 88 forks source link

Fix warning "Parameter must be an array or an object that implements … #402

Closed chmst closed 3 years ago

chmst commented 5 years ago

Pull Request for Issue #393 .

Summary of Changes

Fix warning "Warning: count(): Parameter must be an array or an object that implements Countable in /components/com_weblinks/models/categories.php on line 95

joomdonation commented 3 years ago

It was fixed before but I improved a bit using a better check with direct commit https://github.com/joomla-extensions/weblinks/commit/40fec2bdfa4701f82872743eafcef6738c7166fc (sorry). It makes sure the method is not being called again if it is called second time for some reasons even in the case no items returned (same check with other components in core)

This PR is not needed anymore. So I'm closing it. Thanks @chmst .