Title: [Plugin: http:BL WordPress Plugin] Needs array cast to suppress warning with PHP 5.2
Last modified: August 19, 2016

---

# [Plugin: http:BL WordPress Plugin] Needs array cast to suppress warning with PHP 5.2

 *  [ChrisSamuel](https://wordpress.org/support/users/chrissamuel/)
 * (@chrissamuel)
 * [17 years, 6 months ago](https://wordpress.org/support/topic/plugin-httpbl-wordpress-plugin-needs-array-cast-to-suppress-warning-with-php-52/)
 * 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) {`

Viewing 1 replies (of 1 total)

 *  [janstepien](https://wordpress.org/support/users/janstepien/)
 * (@janstepien)
 * [17 years, 6 months ago](https://wordpress.org/support/topic/plugin-httpbl-wordpress-plugin-needs-array-cast-to-suppress-warning-with-php-52/#post-912132)
 * Thanks Chris, I’ve added your patch to the trunk.

Viewing 1 replies (of 1 total)

The topic ‘[Plugin: http:BL WordPress Plugin] Needs array cast to suppress warning
with PHP 5.2’ is closed to new replies.

 * 1 reply
 * 2 participants
 * Last reply from: [janstepien](https://wordpress.org/support/users/janstepien/)
 * Last activity: [17 years, 6 months ago](https://wordpress.org/support/topic/plugin-httpbl-wordpress-plugin-needs-array-cast-to-suppress-warning-with-php-52/#post-912132)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
