Closed rebeccahum closed 3 months ago
Thanks for the report Rebecca
Hey @johnbillion, just checking if you've had a chance to look into this!
What are your thoughts on maybe adding in action_doing_it_wrong_run()
to prevent recursion?
if ( doing_action( 'doing_it_wrong_run' ) ) {
return;
}
Thanks for the reminder, coincidentally I've just been discussing this in https://github.com/WordPress/wordpress-develop/pull/6462 . I have a solution in mind which will avoid the recursion inside the collectors for this functionality.
Introduced by the new
QM_Collector_Doing_It_Wrong
class -- Query Monitor is inadvertently triggering an infinite loop when it attempts to handle_doing_it_wrong
notices generated by a premature call (before main WP Query) tois_attachment()
when filteringlocale
.To reproduce:
You'll see that it OOMs via:
Commenting out https://github.com/johnbillion/query-monitor/blob/0741b15ea0bc05dc9b6fd71af246cf83cbc45f33/collectors/doing_it_wrong.php#L114 fixes the issue.