From: Mikael Nordfeldth Date: Sat, 6 Jun 2015 18:01:03 +0000 (+0200) Subject: DB_DataObject delete function calls PEAR::isError directly, ignore E_STRICT X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=814696c202af68870b7efd6122c7bdfc6992874c;p=quix0rs-gnu-social.git DB_DataObject delete function calls PEAR::isError directly, ignore E_STRICT --- diff --git a/classes/GS_DataObject.php b/classes/GS_DataObject.php index 2d196026a4..4ca2436eec 100644 --- a/classes/GS_DataObject.php +++ b/classes/GS_DataObject.php @@ -72,6 +72,20 @@ class GS_DataObject extends DB_DataObject return $res; } + // 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