johnbillion / query-monitor

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

Compatibility with WordPress Playground #799

Closed johnbillion closed 10 months ago

johnbillion commented 1 year ago

WordPress Playground uses SQLite which QM is already compatible with, but it doesn't load the mysqli extension like a regular installation of PHP running WordPress. This causes QM to fatal because it unconditionally calls mysqli_get_client_version() which doesn't exist on WPPG.

Let's improve compatibility with WPPG and only call mysqli functions if they exist.

Looks like $_SERVER isn't fully populated too so need to look into that.

Screenshot

Screenshot_20230725_002923_Brave