• I’m got the following warnings:

    [13-May-2020 05:06:02 UTC] PHP Warning: Use of undefined constant DB_USER – assumed ‘DB_USER’ (this will throw an Error in a future version of PHP) in /home3/travgal/public_html/wp-content/plugins/query-monitor/wp-content/db.php on line 139
    [13-May-2020 05:06:02 UTC] PHP Warning: Use of undefined constant DB_PASSWORD – assumed ‘DB_PASSWORD’ (this will throw an Error in a future version of PHP) in /home3/travgal/public_html/wp-content/plugins/query-monitor/wp-content/db.php on line 139
    [13-May-2020 05:06:02 UTC] PHP Warning: Use of undefined constant DB_NAME – assumed ‘DB_NAME’ (this will throw an Error in a future version of PHP) in /home3/travgal/public_html/wp-content/plugins/query-monitor/wp-content/db.php on line 139
    [13-May-2020 05:06:02 UTC] PHP Warning: Use of undefined constant DB_HOST – assumed ‘DB_HOST’ (this will throw an Error in a future version of PHP) in /home3/travgal/public_html/wp-content/plugins/query-monitor/wp-content/db.php on line 139

    The code on line 139 is:
    // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
    $wpdb = new QM_DB( DB_USER, DB_PASSWORD, DB_NAME, DB_HOST );

    Is this really a problem? If so, how can I fix it?

    Thanks.

    The page I need help with: [log in to see the link]

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

    (@johnbillion)

    WordPress Core Developer

    It sounds like you’ve got some custom database configuration going on that’s not defining the constants that WordPress requires.

    If this isn’t something custom you’ve done yourself then your best bet is to contact your host or the person who built your website.

    Thread Starter thetravelgal

    (@thetravelgal)

    Does this mean it’s an error in the database itself or in a php file?

    Is this something a plugin like Media Cleaner or regenerate thumbnails could cause?

    This is an old website that’s basically just a standard WordPress set-up with a few minor tweaks over the years.

    • This reply was modified 4 years, 6 months ago by thetravelgal.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘PHP warning in Query monitor’ is closed to new replies.