humanmade / humanmade/comment-popularity

Invalid argument supplied for foreach

Open
#121 0 comments 0 reactions 1 assignee Claimed by @pdewouters View on GitHub
bug
Dominant language
PHP
Stars
26
Forks
14
PR merge metrics
No merged PRs in 30d

Description

Hello!

When I added the code to a new mu-plugin for allow guest voting, I'm getting this error the first time the user visit the website:

Warning: Invalid argument supplied for foreach() in /home/username/public_html/wp-content/plugins/comment-popularity/inc/class-comment-popularity.php on line 363

After the user vote, this error is removed. What can I do to fix it for new users? It doesn't give a good impression to show an error.

Thank you.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.