Title: PHP warning: Undefined array key &#8220;rand&#8221;
Last modified: September 2, 2024

---

# PHP warning: Undefined array key “rand”

 *  Resolved [ironmanixs](https://wordpress.org/support/users/ironmanixs/)
 * (@ironmanixs)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/php-warning-undefined-array-key-rand/)
 * Hi there,
 * I am using PHP 8.2.23 an see the following warning in the php error log.
   Undefined
   array key “rand”, probably an extra check is needed, because of PHP 8.x
 * PHP Warning: Undefined array key “rand” in /var/www/html/wp-content/plugins/recent-
   posts-widget-with-thumbnails/recent-posts-widget-with-thumbnails.php on line 
   138
 * If you need more info, let me know!
 * –R

Viewing 1 replies (of 1 total)

 *  Plugin Author [Kybernetik Services](https://wordpress.org/support/users/kybernetikservices/)
 * (@kybernetikservices)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/php-warning-undefined-array-key-rand/#post-17998396)
 * Thank you [@ironmanixs](https://wordpress.org/support/users/ironmanixs/) for 
   the information.
 * We are in an ongoing process to improve Recent Posts Widget With Thumbnails for
   PHP 8.x. We will consider the warning with the next update.

Viewing 1 replies (of 1 total)

The topic ‘PHP warning: Undefined array key “rand”’ is closed to new replies.

 * ![](https://ps.w.org/recent-posts-widget-with-thumbnails/assets/icon-256x256.
   png?rev=2478511)
 * [Recent Posts Widget With Thumbnails](https://wordpress.org/plugins/recent-posts-widget-with-thumbnails/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/recent-posts-widget-with-thumbnails/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/recent-posts-widget-with-thumbnails/)
 * [Active Topics](https://wordpress.org/support/plugin/recent-posts-widget-with-thumbnails/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/recent-posts-widget-with-thumbnails/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/recent-posts-widget-with-thumbnails/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Kybernetik Services](https://wordpress.org/support/users/kybernetikservices/)
 * Last activity: [1 year, 8 months ago](https://wordpress.org/support/topic/php-warning-undefined-array-key-rand/#post-17998396)
 * Status: resolved