silverstripe / silverstripe-framework

Silverstripe Framework, the MVC framework that powers Silverstripe CMS
https://www.silverstripe.org
BSD 3-Clause "New" or "Revised" License
719 stars 820 forks source link

`?showqueries=1` doesn't work #11128

Closed GuySartorelli closed 4 months ago

GuySartorelli commented 4 months ago

There are some scenarios where the mysql handle in MySQLQuery isn't an object. Most code in that class already has protections against that scenario, but rewind() doesn't.

That can be triggered by using ?showqueries=1 in the URL.

NOTE: I can't reproduce the bug on 5.1, but I was getting it on 5.x - and ultimately this condition should have always been there anyway.

PRs