-
-
Notifications
You must be signed in to change notification settings - Fork 212
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 Warning: Undefined array key (probably Windows-only issue) #866
Comments
Also encountered this error. The problem is that target array items on Windows actual value is not The plugin should use |
That's what $file = QM_Util::standard_dir( $file ); but it does it too late, because it has already used |
+1 for me. Very annoying issue. |
Previously QM_Util::standard_dir was being called for some file paths but not for others, leading to inconsistencies on Windows servers. Fixes johnbillion#866.
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: