Title: PHP Warning: Undefined array key
Last modified: May 14, 2023

---

# PHP Warning: Undefined array key

 *  [Malae](https://wordpress.org/support/users/malae/)
 * (@malae)
 * [3 years ago](https://wordpress.org/support/topic/php-warning-undefined-array-key-10/)
 * Hello John,
   Please fix the following PHP warning:`PHP Warning: Undefined array
   key "file" in /query-monitor/collectors/php_errors.php on line 367`

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

 *  Plugin Author [John Blackbourn](https://wordpress.org/support/users/johnbillion/)
 * (@johnbillion)
 * WordPress Core Developer
 * [3 years ago](https://wordpress.org/support/topic/php-warning-undefined-array-key-10/#post-16741196)
 * Thanks, can you let me know which errors are being logged in the “PHP Errors”
   panel in Query Monitor please? A screenshot of that panel would be good.
 *  Thread Starter [Malae](https://wordpress.org/support/users/malae/)
 * (@malae)
 * [3 years ago](https://wordpress.org/support/topic/php-warning-undefined-array-key-10/#post-16744158)
 * The above warning was in the wp-debug file, but nothing is showing in the panel.
   Assuming that this may be thrown by another plugin, I have gone through the site
   and the only issue I found is that if I try to open **Customise**, I get a fatal
   error:
 * `**Fatal error**: Uncaught Error: strnatcasecmp(): Argument #1 ($string1) must
   be of type string, array given
   in **/home/u675030324/domains/chronographia.eu/
   public_html/wp-includes/class-wp-customize-widgets.php** on line **1**
 * `Call stack:`
 * `strnatcasecmp()
   wp-includes/class-wp-customize-widgets.php:1131
 * `WP_Customize_Widgets::_sort_name_callback()`
 * `usort()
   wp-includes/class-wp-customize-widgets.php:1050
 * `WP_Customize_Widgets::get_available_widgets()
   wp-includes/class-wp-customize-
   widgets.php:714
 * `WP_Customize_Widgets::enqueue_scripts()
   wp-includes/class-wp-hook.php:308
 * `WP_Hook::apply_filters()
   wp-includes/class-wp-hook.php:332
   `
 * `WP_Hook::do_action()
   wp-includes/plugin.php:517
 * `do_action()
   wp-admin/customize.php:1
 * **`Query Monitor`**
    -  This reply was modified 3 years ago by [Malae](https://wordpress.org/support/users/malae/).

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

The topic ‘PHP Warning: Undefined array key’ is closed to new replies.

 * ![](https://ps.w.org/query-monitor/assets/icon.svg?rev=2994095)
 * [Query Monitor](https://wordpress.org/plugins/query-monitor/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/query-monitor/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/query-monitor/)
 * [Active Topics](https://wordpress.org/support/plugin/query-monitor/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/query-monitor/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/query-monitor/reviews/)

## Tags

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

 * 2 replies
 * 2 participants
 * Last reply from: [Malae](https://wordpress.org/support/users/malae/)
 * Last activity: [3 years ago](https://wordpress.org/support/topic/php-warning-undefined-array-key-10/#post-16744158)
 * Status: not resolved