FIX Don't assume mysql handle is an object (#11129)

This commit is contained in:
Guy Sartorelli 2024-02-08 15:07:33 +13:00 committed by GitHub
parent 4d96674752
commit e87c724700
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -76,7 +76,7 @@ class MySQLQuery extends Query
public function rewind(): void
{
// Check for the method first since $this->handle is a mixed type
if (method_exists($this->handle, 'data_seek')) {
if (is_object($this->handle) && method_exists($this->handle, 'data_seek')) {
$this->handle->data_seek(0);
}
}