johnbillion / query-monitor

The developer tools panel for WordPress
https://querymonitor.com
GNU General Public License v2.0
1.6k stars 211 forks source link

language collector 'file' and 'line' sometimes missing #710

Closed PhilMakower closed 1 year ago

PhilMakower commented 1 year ago

in log_file_load() the $caller doesn't always have 'file' or 'line', I think when the function is filtered, or when we are in a hook. In these cases, it has 'calling_file' and 'calling_line' instead, so we can copy those values to 'file' and 'line'.

johnbillion commented 1 year ago

Thanks very much for the PR @PhilMakower but I've found that the root cause of this is in the QM_Collector class. I'll get it fixed in the next release. Cheers!