Forums

[Plugin: http:BL WordPress Plugin] Needs array cast to suppress warning with PHP 5.2 (2 posts)

  1. ChrisSamuel
    Member
    Posted 12 months ago #

    At line 52 of httpbl.php you need to explicitly cast $results as an (array) to prevent an ugly PHP warning at the top of each page which says:

    Warning: Invalid argument supplied for foreach() in /var/www/htdocs/wp-content/plugins/httpbl/httpbl.php on line 52

    In other words, it becomes:

    foreach ((array)$results as $row) {

  2. janstepien
    Member
    Posted 11 months ago #

    Thanks Chris, I've added your patch to the trunk.

Reply

You must log in to post.

About this Topic

Tags