Skip to content

Conversation

JanJakes
Copy link
Member

This PR moves the registration of the SQLite enhancements for Query Monitor to the Query Monitor boot process to make them work in Playground, as Playground only loads the SQLite driver and not all the SQLite Database Integration plugin.

Screenshot 2025-07-25 at 13 27 21

JanJakes added 2 commits July 25, 2025 13:14
…n the plugin

This makes the enhancements work in WordPress Playground, as Playground only
loads the SQLite driver and not all of the SQLite Database Inegration plugin.
@JanJakes JanJakes requested a review from adamziel July 25, 2025 11:29
@JanJakes JanJakes merged commit 66ae73b into develop Jul 25, 2025
12 checks passed
@JanJakes JanJakes deleted the query-monitor-playground-loading-fix branch July 25, 2025 16:25
adamziel added a commit that referenced this pull request Jul 25, 2025
PR #217 added a line `global $wpdb` to
`integration/query-monitor/boot.php` which triggered this warning in
WordPress Playground multisite tests:

```
+ <b>Warning</b>:  Attempt to read property "option_value" on null in <b>/internal/shared/sqlite-database-integration/integrations/query-monitor/boot.php</b> on line <b>80</b><br />
```

Removing either `global $wpdb` or guarding against a null `$value`
solves the failure. I assume there's a reason for adding `global $wpdb`
so, in this PR, I'm adding a guard against a null value.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant