X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=classes%2FGS_DataObject.php;h=4ca2436eec8df941c44f141e3becaf8e9fb94350;hb=4d17d9533552ea620b83109c550e250a5c236291;hp=67f324049324b7affacf3f44c21d43477ef91e46;hpb=9712a92853262434769d836a20c90249200536bf;p=quix0rs-gnu-social.git diff --git a/classes/GS_DataObject.php b/classes/GS_DataObject.php index 67f3240493..4ca2436eec 100644 --- a/classes/GS_DataObject.php +++ b/classes/GS_DataObject.php @@ -59,7 +59,7 @@ class GS_DataObject extends DB_DataObject return $res; } - public function debugLevel($v = null) + static public function debugLevel($v = null) { // avoid those annoying PEAR::DB strict standards warnings it causes $old = error_reporting(); @@ -72,7 +72,21 @@ class GS_DataObject extends DB_DataObject return $res; } - public function factory($table = '') + // delete calls PEAR::isError from DB_DataObject, so let's make that disappear too + public function delete($useWhere = false) + { + // avoid those annoying PEAR::DB strict standards warnings it causes + $old = error_reporting(); + error_reporting(error_reporting() & ~E_STRICT); + + $res = parent::delete($useWhere); + + // reset + error_reporting($old); + return $res; + } + + static public function factory($table = '') { // avoid those annoying PEAR::DB strict standards warnings it causes $old = error_reporting(); @@ -137,6 +151,34 @@ class GS_DataObject extends DB_DataObject return $res; } + // insert calls PEAR::isError from DB_DataObject, so let's make that disappear too + public function insert() + { + // avoid those annoying PEAR::DB strict standards warnings it causes + $old = error_reporting(); + error_reporting(error_reporting() & ~E_STRICT); + + $res = parent::insert(); + + // reset + error_reporting($old); + return $res; + } + + // DB_DataObject's joinAdd calls DB_DataObject::factory explicitly, so our factory-override doesn't work + public function joinAdd($obj = false, $joinType='INNER', $joinAs=false, $joinCol=false) + { + // avoid those annoying PEAR::DB strict standards warnings it causes + $old = error_reporting(); + error_reporting(error_reporting() & ~E_STRICT); + + $res = parent::joinAdd($obj, $joinType, $joinAs, $joinCol); + + // reset + error_reporting($old); + return $res; + } + public function links() { // avoid those annoying PEAR::DB strict standards warnings it causes @@ -164,7 +206,7 @@ class GS_DataObject extends DB_DataObject return $res; } - public function staticGet($class, $k, $v = null) + static public function staticGet($class, $k, $v = null) { // avoid those annoying PEAR::DB strict standards warnings it causes $old = error_reporting();