mod_weblinks Warning: count(): Parameter must be an array#432
Merged
joomdonation merged 2 commits intojoomla-extensions:masterfrom Aug 18, 2021
ReLater:patch-2
Merged
mod_weblinks Warning: count(): Parameter must be an array#432joomdonation merged 2 commits intojoomla-extensions:masterfrom ReLater:patch-2
joomdonation merged 2 commits intojoomla-extensions:masterfrom
ReLater:patch-2
Conversation
|
Could this be closed? #422? This comment was created with the J!Tracker Application at issues.joomla.org/tracker/weblinks/432. |
Author
|
My pr is only for the module. Looks like #422 is also talking about the component. Therefore: I don't know. |
|
Hi, I installed com_weblinks 4.0.0-dev in Joomla version, 4.0.0-beta8-dev. I receive an error at administrator/index.php?option=com_categories&extension=com_weblinks
Which com_weblinks should I have installed?
|
Contributor
|
@ReLater If you look at the model class, it could return false https://github.com/joomla-extensions/weblinks/blob/master/src/components/com_weblinks/models/category.php#L76 (in case database failure) and for that case, the error still happens. I updated your PR abit to return empty array for that case. Hope that is OK for you. |
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary of Changes
Testing Instructions
Expected result
Actual result
Warning: count(): Parameter must be an array or an object that implements Countable in modules/mod_weblinks/mod_weblinks.php on line 17See: https://github.com/joomla-extensions/weblinks/blob/master/src/modules/mod_weblinks/mod_weblinks.php#L17-L20