Title: PHP Warning: Invalid argument
Last modified: April 12, 2018

---

# PHP Warning: Invalid argument

 *  Resolved [ellayafa](https://wordpress.org/support/users/ellayafa/)
 * (@ellayafa)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/php-warning-invalid-argument-5/)
 * Hello,
    I have seen a few forums regarding a similar issue.
 * This is the error I am getting:
 * PHP Warning: Invalid argument supplied for foreach() in /***/wp-content/plugins/
   wp-random-post-thumbnails/includes/template-tags.php on line 224
 * Has there been a fix for this? I would hate to uninstall it and look for alternatives
   as it was working quiet well.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fphp-warning-invalid-argument-5%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Brianna Deleasa](https://wordpress.org/support/users/bdeleasa/)
 * (@bdeleasa)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/php-warning-invalid-argument-5/#post-10180108)
 * Hi ellayafa!
 * Thanks for reporting this! It’s actually a different warning than the others 
   reported previously (which were fixed in previous updates).
 * Can you please install the latest version of the plugin and let me know if the
   warning is resolved on your end? Thank you!
 *  Thread Starter [ellayafa](https://wordpress.org/support/users/ellayafa/)
 * (@ellayafa)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/php-warning-invalid-argument-5/#post-10183159)
 * Hi Brianna,
    Thank you so much, the issue seems to be resolved now!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘PHP Warning: Invalid argument’ is closed to new replies.

 * ![](https://ps.w.org/wp-random-post-thumbnails/assets/icon-256x256.png?rev=1541376)
 * [WP Random Post Thumbnails](https://wordpress.org/plugins/wp-random-post-thumbnails/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-random-post-thumbnails/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-random-post-thumbnails/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-random-post-thumbnails/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-random-post-thumbnails/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-random-post-thumbnails/reviews/)

## Tags

 * [PHP Warning](https://wordpress.org/support/topic-tag/php-warning/)

 * 2 replies
 * 2 participants
 * Last reply from: [ellayafa](https://wordpress.org/support/users/ellayafa/)
 * Last activity: [8 years, 1 month ago](https://wordpress.org/support/topic/php-warning-invalid-argument-5/#post-10183159)
 * Status: resolved