Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP notices and warnings when WP_DEBUG is enabled #4

Open
adeelq opened this issue Aug 15, 2023 · 0 comments
Open

PHP notices and warnings when WP_DEBUG is enabled #4

adeelq opened this issue Aug 15, 2023 · 0 comments

Comments

@adeelq
Copy link

adeelq commented Aug 15, 2023

There are tons (3.42 MB per request) of annoying PHP notices and warnings when WP_DEBUG is enabled. Please see attached screenshot.

Screenshot 2023-08-15 at 13 11 45

How to replicate?

  • PHP version 8.2
  • Wordpress version 6.3
  • Query Monitor version 3.13.1
  • Enable WP_DEBUG and WP_DEBUG_LOG in wp-config.php
  • See debug.log files under wp-content directory

A Fix?

  • It can be fixed easily by replacing line 34 with following
    $this->data = array_merge((array)$this->data, array('stats' => [$component => ['size' => 0, 'number_of_files' => 0, 'opcache_size' => 0]]));
  • Line 36 to 48 can be removed since above will declare it one go.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant