php8.2 stupidity
authorAlan <alan@roojs.com>
Fri, 24 Mar 2023 03:00:45 +0000 (11:00 +0800)
committerAlan <alan@roojs.com>
Fri, 24 Mar 2023 03:00:45 +0000 (11:00 +0800)
DB/DataObject.php

index 74261e5..395fd5f 100644 (file)
@@ -5054,7 +5054,7 @@ class DB_DataObject extends DB_DataObject_Overload
         // clear the staticGet cache as well.
         $this->_clear_cache();
         // this is a huge bug in DB!
-        if (isset($_DB_DATAOBJECT['CONNECTIONS'][$this->_database_dsn_md5])) {
+        if (isset($_DB_DATAOBJECT['CONNECTIONS'][$this->_database_dsn_md5]) && isset($_DB_DATAOBJECT['CONNECTIONS'][$this->_database_dsn_md5]->num_rows)) {
             $_DB_DATAOBJECT['CONNECTIONS'][$this->_database_dsn_md5]->num_rows = array();
         }