Title: Windows &#8211; Undefined array key
Last modified: August 31, 2024

---

# Windows – Undefined array key

 *  [damchtlv](https://wordpress.org/support/users/damchtlv/)
 * (@damchtlv)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/windows-undefined-array-key/)
 * Hi,
   First of all, awesome plugin, use it every day in my workjob 🙂An annoying
   issue i’ve found is that QM is spamming my **debug.log** with this when i go 
   to the frontend:
 *     ```wp-block-code
       [31-Aug-2024 00:51:38 UTC] PHP Warning:  Undefined array key "C:/laragon_new/www/XXX/wp-content/themes/XXX/parts/header.html" in C:\laragon_new\www\XXX\wp-content\plugins\query-monitor\output\html\theme.php on line 163[31-Aug-2024 00:51:38 UTC] PHP Warning:  Undefined array key "C:/laragon_new/www/XXX/wp-content/themes/XXX/parts/footer.html" in C:\laragon_new\www\XXX\wp-content\plugins\query-monitor\output\html\theme.php on line 163
       ```
   
 * 
   For info, **i use PHP 8.3** at the moment but i don’t think _(not quite sure)_
   that’s it’s related.What i found out is that QM seems to be collecting data differently
   about “paths” on Windows (which is causing the PHP Warnings.When i log **$parts**
   and **$data->count_template_parts**, i can clearly see that **one is using forward
   slashes** but the **other one** **is using a mix**, the logs:
 *     ```wp-block-code
       [31-Aug-2024 00:59:27 UTC] DEBUG: $parts Array([C:/laragon_new/www/XXX/wp-content/themes/XXX/parts/header.html] => parts/header.html[C:/laragon_new/www/XXX/wp-content/themes/XXX/parts/footer.html] => parts/footer.html)[31-Aug-2024 00:59:27 UTC] DEBUG: $data->count_template_parts Array([C:\laragon_new\www\XXX/wp-content/themes/XXX/parts/header.html] => 1[C:\laragon_new\www\XXX/wp-content/themes/XXX/parts/footer.html] => 1)
       ```
   
 * 
   If you have an idea on how to fix this, that would be great 🙂Have a good day,
   Damien

Viewing 1 replies (of 1 total)

 *  Plugin Author [John Blackbourn](https://wordpress.org/support/users/johnbillion/)
 * (@johnbillion)
 * WordPress Core Developer
 * [1 year, 7 months ago](https://wordpress.org/support/topic/windows-undefined-array-key/#post-17986933)
 * Thanks for the report! I’ll take a look.

Viewing 1 replies (of 1 total)

The topic ‘Windows – Undefined array key’ is closed to new replies.

 * ![](https://ps.w.org/query-monitor/assets/icon.svg?rev=2994095)
 * [Query Monitor](https://wordpress.org/plugins/query-monitor/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/query-monitor/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/query-monitor/)
 * [Active Topics](https://wordpress.org/support/plugin/query-monitor/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/query-monitor/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/query-monitor/reviews/)

## Tags

 * [array](https://wordpress.org/support/topic-tag/array/)
 * [key](https://wordpress.org/support/topic-tag/key/)
 * [path](https://wordpress.org/support/topic-tag/path/)
 * [undefined](https://wordpress.org/support/topic-tag/undefined/)
 * [windows](https://wordpress.org/support/topic-tag/windows/)

 * 1 reply
 * 2 participants
 * Last reply from: [John Blackbourn](https://wordpress.org/support/users/johnbillion/)
 * Last activity: [1 year, 7 months ago](https://wordpress.org/support/topic/windows-undefined-array-key/#post-17986933)
 * Status: not resolved