From: Mikael Nordfeldth Date: Sat, 6 Jun 2015 17:59:01 +0000 (+0200) Subject: GS_DataObject overrides DB_DataObject insert() too X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=50070c9b0a0ea792044c8080da08720176866a85;p=quix0rs-gnu-social.git GS_DataObject overrides DB_DataObject insert() too --- diff --git a/classes/GS_DataObject.php b/classes/GS_DataObject.php index 47125f2438..2d196026a4 100644 --- a/classes/GS_DataObject.php +++ b/classes/GS_DataObject.php @@ -137,6 +137,20 @@ 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) {