Title: Undefined array key 0
Last modified: September 4, 2022

---

# Undefined array key 0

 *  Resolved [Rolf Allard van Hagen](https://wordpress.org/support/users/ravanh/)
 * (@ravanh)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/undefined-array-key-0-3/)
 * Hi,
 * > PHP Warning: Undefined array key 0 in /…../wp-content/plugins/front-page-category/
   > front-page-category.php on line 273
 * Above line 273 in front-page-category.php it sais:
 *     ```
       * If the type is an array then we know there is only one value since we
       * checked the length above.
       ```
   
 * but apparently it can also be an empty array…

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

 *  Plugin Author [binarymoon](https://wordpress.org/support/users/binarymoon/)
 * (@binarymoon)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/undefined-array-key-0-3/#post-15978373)
 * Hi – thanks for the report. I can’t replicate this but I will add a check for
   empty arrays and hope that removes the error.
 * Ben
 *  [mkopala](https://wordpress.org/support/users/mkopala/)
 * (@mkopala)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/undefined-array-key-0-3/#post-15978585)
 * Latest version (3.3.4) now has this fatal error:
 *     ```
       PHP Fatal error:  Uncaught Error: Call to undefined function is_empty() in /www/wp-content/plugins/front-page-category/front-page-category.php:262
       ```
   
 * Maybe you were looking for `empty()`?
 *  Plugin Author [binarymoon](https://wordpress.org/support/users/binarymoon/)
 * (@binarymoon)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/undefined-array-key-0-3/#post-15979316)
 * oops – apologies. I did this very quickly last night. I shall fix that now.
 *  Thread Starter [Rolf Allard van Hagen](https://wordpress.org/support/users/ravanh/)
 * (@ravanh)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/undefined-array-key-0-3/#post-15980466)
 * Not idea when/how exactly the issue was triggered but I have not seen it happen
   since. Thanks for maintaining this useful plugin 🙂

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

The topic ‘Undefined array key 0’ is closed to new replies.

 * ![](https://ps.w.org/front-page-category/assets/icon-128x128.png?rev=2526174)
 * [Front Page Category](https://wordpress.org/plugins/front-page-category/)
 * [Support Threads](https://wordpress.org/support/plugin/front-page-category/)
 * [Active Topics](https://wordpress.org/support/plugin/front-page-category/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/front-page-category/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/front-page-category/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [Rolf Allard van Hagen](https://wordpress.org/support/users/ravanh/)
 * Last activity: [3 years, 9 months ago](https://wordpress.org/support/topic/undefined-array-key-0-3/#post-15980466)
 * Status: resolved