Support » Plugin: Query Monitor » Plugin causing Php Error – Undefined index: file

  • Resolved Bhargav

    (@bhargavy)


    I’m using this on windows localhost with ammps.

    Notice
    Undefined index: file 3 wp-content/plugins/query-monitor/output/html/languages.php:56 do_action(‘shutdown’)
    shutdown_action_hook() Plugin: query-monitor
    Undefined index: line 3 wp-content/plugins/query-monitor/output/html/languages.php:56 do_action(‘shutdown’)
    shutdown_action_hook() Plugin: query-monitor

    https://wordpress.org/plugins/query-monitor/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author John Blackbourn

    (@johnbillion)

    WordPress Core Developer

    Thanks for the report. I’m already aware of this issue and it’ll be fixed in the next release.

    Looks like the quick fix is just to check if the value is empty before output.

    echo self::output_filename(
    empty($mofile['caller']['display']) ? '' : $mofile['caller']['display'],
    empty($mofile['caller']['file']) ? '' : $mofile['caller']['file'],
    empty($mofile['caller']['line']) ? '' : $mofile['caller']['line'] ); // WPCS: XSS ok.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Plugin causing Php Error – Undefined index: file’ is closed to new replies.