Title: Warning: Undefined array key &#8220;exclude_current&#8221;
Last modified: August 24, 2022

---

# Warning: Undefined array key “exclude_current”

 *  [abrovink](https://wordpress.org/support/users/abrovink/)
 * (@abrovink)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/warning-undefined-array-key-exclude_current/)
 * This is the full message:
 * Warning: Undefined array key “exclude_current” in […]\wp-content\plugins\ultimate-
   posts-widget\ultimate-posts-widget.php on line 138
 * This issue doesn’t seem to be resolved. And original post is closed, so here 
   it comes again.

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

 *  [Matthieu](https://wordpress.org/support/users/theschappy/)
 * (@theschappy)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/warning-undefined-array-key-exclude_current/#post-16084825)
 * Hi [@abrovink](https://wordpress.org/support/users/abrovink/) et al.,
 * just a quick fix attached.
 *     ```
       --- ultimate-posts-widget.org.php       2022-10-10 13:51:41.964656264 +0200
       +++ ultimate-posts-widget.php   2022-10-10 13:59:32.765066868 +0200
       @@ -135,7 +135,7 @@
              $atcat = $instance['atcat'] ? true : false;
              $thumb_size = $instance['thumb_size'];
              $attag = $instance['attag'] ? true : false;
       -      $exclude_current = $instance['exclude_current'] ? true : false;
       +      $exclude_current = isset($instance['exclude_current']);
              $excerpt_length = $instance['excerpt_length'];
              $excerpt_readmore = $instance['excerpt_readmore'];
              $sticky = $instance['sticky'];
       ```
   
 * Cheers!
 *  [Razorfrog Web Design](https://wordpress.org/support/users/razorfrog/)
 * (@razorfrog)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/warning-undefined-array-key-exclude_current/#post-16236975)
 * I’m also seeing this warning after updating to PHP 8.0. Will it be patched? Thank
   you.
 *  [Abigailm](https://wordpress.org/support/users/abigailm/)
 * (@abigailm)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/warning-undefined-array-key-exclude_current/#post-16379994)
 * I just updated a site to PHP 8.1 and am seeing the same error message –so obviously
   not patched as of now. 
   PHP Warning: Undefined array key “exclude_current” in…/
   wp-content/plugins/ultimate-posts-widget/ultimate-posts-widget.php on line 135This
   is a fairly high-traffic website and I’ve only seen this error once so far in
   my logs, so I’m not sure what is triggering it.

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

The topic ‘Warning: Undefined array key “exclude_current”’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/ultimate-posts-widget_5b9f2b.svg)
 * [Ultimate Posts Widget](https://wordpress.org/plugins/ultimate-posts-widget/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ultimate-posts-widget/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ultimate-posts-widget/)
 * [Active Topics](https://wordpress.org/support/plugin/ultimate-posts-widget/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ultimate-posts-widget/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ultimate-posts-widget/reviews/)

## Tags

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

 * 3 replies
 * 4 participants
 * Last reply from: [Abigailm](https://wordpress.org/support/users/abigailm/)
 * Last activity: [3 years, 4 months ago](https://wordpress.org/support/topic/warning-undefined-array-key-exclude_current/#post-16379994)
 * Status: not a support question