DB_DataObject delete function calls PEAR::isError directly, ignore E_STRICT

This commit is contained in:
Mikael Nordfeldth 2015-06-06 20:01:03 +02:00
parent 50070c9b0a
commit 814696c202

View File

@ -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