From 814696c202af68870b7efd6122c7bdfc6992874c Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Sat, 6 Jun 2015 20:01:03 +0200 Subject: [PATCH] DB_DataObject delete function calls PEAR::isError directly, ignore E_STRICT --- classes/GS_DataObject.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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 -- 2.39.5