• Hello John,

    Please take a look at the following:

    PHP Warning: Undefined array key "file" in /query-monitor/collectors/php_errors.php on line 364PHP Warning: Undefined array key "file" in /query-monitor/collectors/php_errors.php on line 364

    • This topic was modified 5 months, 2 weeks ago by Malae.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author John Blackbourn

    (@johnbillion)

    WordPress Core Developer

    Thanks. Are you able to identify the cause of this error? For example, which URL does it occur on? Presumably this is triggered when a PHP error occurs on your site, do you know which error is causing it?

    Thanks

    Thread Starter Malae

    (@malae)

    My apologies, I was not thinking clearly when I posted and the information was incomplete.

    I have a site on a LAMP server where I am testing a plugin (not in the wordpress directory). It works fine except that it throws a fatal error if I open the Customizer. I was able to create the issue again and the details are as below.

    The following from wp-debug:

    PHP Warning: Undefined array key "line" in /query-monitor/collectors/php_errors.php on line 364

    Fatal error: Uncaught TypeError: strnatcasecmp(): Argument #1 ($string1) must be of type string, array given in /wp-includes/class-wp-customize-widgets.php:1131
    Stack trace: 0 /wp-includes/class-wp-customize-widgets.php(1131): strnatcasecmp() 1 [internal function]: WP_Customize_Widgets->_sort_name_callback() 2 /wp-includes/class-wp-customize-widgets.php(1050): usort() 3 /wp-includes/class-wp-customize-widgets.php(714): WP_Customize_Widgets->get_available_widgets() 4 /wp-includes/class-wp-hook.php(324): WP_Customize_Widgets->enqueue_scripts() 5 /wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() 6 /wp-includes/plugin.php(517): WP_Hook->do_action() 7 /wp-admin/customize.php(123): do_action() 8 {main}

    thrown in /wp-includes/class-wp-customize-widgets.php on line 1131

    Details as reflected in Query Monitor:

    Fatal error: Uncaught Error: strnatcasecmp(): Argument #1 ($string1) must be of type string, array given in /wp-includes/class-wp-customize-widgets.php on line 1131 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:324 WP_Hook::apply_filters() wp-includes/class-wp-hook.php:348 WP_Hook::do_action() wp-includes/plugin.php:517 do_action() wp-admin/customize.php:123

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.