WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: GD Star Rating] foreach parameter not an array warning in wpmu sitewide feeds (2 posts)

  1. Ben
    Member
    Posted 4 years ago #

    Hey,
    We're running a WPMU setup with the Sitewide Feed Plugin and on our global feed we get this error message:

    Warning: Invalid argument supplied for foreach() in E:\xampp\htdocs\wpmu\wp-content\plugins\gd-star-rating\gd-star-rating.php on line 1915
    
    Warning: Invalid argument supplied for foreach() in E:\xampp\htdocs\wpmu\wp-content\plugins\gd-star-rating\gd-star-rating.php on line 1915

    I think I tracked it down to line 1111 in gd-star-rating.php. Usually this line would not get executed for feeds but unfortunately the sitewide feed plugin does not change the is_feed value in wp_query and therefore is_feed() still returns false in this case...

    Obviously it would be the job of the sitewide feed plugin to make sure its feeds are actually recognised as feeds, but maybe you could also make sure that your variables are arrays before you use them in a foreach loop!? :-)

  2. Milan Petrovic
    Member
    Posted 4 years ago #

    Unfortunatly I still didn't tested plugin with WPMU yet, but plugin mostly works. As for the WPMU specific plugins, the problem is even bigger. I can add some checks as you suggest, but this will not solve all problems. Hopefully I will be able to test it myself with WPMU some time soon.

Topic Closed

This topic has been closed to new replies.

About this Topic