You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running Query Monitor with the Twenty Twenty-Four theme on Windows I get these warnings:
PHP Warning: Undefined array key "O:/Apache24/htdocs/wordpress/wp-content/themes/twentytwentyfour/parts/header.html" in O:\\Apache24\\htdocs\\wordpress\\wp-content\\plugins\\query-monitor\\output\\html\\theme.php on line 163
PHP Warning: Undefined array key "O:/Apache24/htdocs/wordpress/wp-content/themes/twentytwentyfour/parts/post-meta.html" in O:\\Apache24\\htdocs\\wordpress\\wp-content\\plugins\\query-monitor\\output\\html\\theme.php on line 163
PHP Warning: Undefined array key "O:/Apache24/htdocs/wordpress/wp-content/themes/twentytwentyfour/parts/footer.html" in O:\\Apache24\\htdocs\\wordpress\\wp-content\\plugins\\query-monitor\\output\\html\\theme.php on line 163
The problem is that target array items on Windows actual value is not O:/Apache24/htdocs/wordpress/wp-content/themes/twentytwentyfour/parts/header.html, but O:\Apache24\htdocs\wordpress/wp-content/themes/twentytwentyfour/parts/header.html
The plugin should use wp_normalize_path when forming this array.
When running Query Monitor with the Twenty Twenty-Four theme on Windows I get these warnings:
I believe the cause of the issue is here:
https://github.com/johnbillion/query-monitor/blob/3.16.0/collectors/theme.php#L473-L500
Note the following:
$this->data->count_template_parts[ $file ]
uses$file
before callingQM_Util::standard_dir
$this->data->template_parts[ $file ]
and$this->data->theme_template_parts[ $file ]
use$file
after callingQM_Util::standard_dir
So,
$this->data->count_template_parts
does not have the same keys as the other arrays.The text was updated successfully, but these errors were encountered: