WPDB SAVEQUERIES unusable by plugins
|Reported by:||filosofo||Owned by:||anonymous|
|Severity:||normal||Keywords:||SAVEQUERIES wpdb has-patch|
Currently, WPDB's SAVEQUERIES constant is defined as "false" when the WPDB class file is included, if it's not already defined. That means that you can't save queries outside of defining SAVEQUERIES in wp-config.php. So plugins, for example, cannot set it to true for troubleshooting purposes.
My patch, instead of defining SAVEQUERIES on load, checks that it's defined at the two spots in which it's used.