From: Mikael Nordfeldth Date: Sat, 6 Jun 2015 16:29:15 +0000 (+0200) Subject: MITM the DB_DataObject to avoid PEAR::DB strict standards warnings X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=9712a92853262434769d836a20c90249200536bf;p=quix0rs-gnu-social.git MITM the DB_DataObject to avoid PEAR::DB strict standards warnings --- diff --git a/classes/GS_DataObject.php b/classes/GS_DataObject.php new file mode 100644 index 0000000000..67f3240493 --- /dev/null +++ b/classes/GS_DataObject.php @@ -0,0 +1,192 @@ +. */ -if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } +if (!defined('GNUSOCIAL')) { exit(1); } /** * Extended DB_DataObject to improve a few things: @@ -26,7 +26,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } * - don't leak memory when loading already-used .ini files * (eg when using the same schema on thousands of databases) */ -class Safe_DataObject extends DB_DataObject +class Safe_DataObject extends GS_DataObject { /** * Destructor to free global memory resources associated with @@ -177,7 +177,6 @@ class Safe_DataObject extends DB_DataObject } } - if (!$this->_database) { $this->_connect(); } @@ -204,7 +203,7 @@ class Safe_DataObject extends DB_DataObject } if (empty($_DB_DATAOBJECT['CONFIG'])) { - DB_DataObject::_loadConfig(); + self::_loadConfig(); } // if you supply this with arguments, then it will take those