]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
DB_DataObject delete function calls PEAR::isError directly, ignore E_STRICT
authorMikael Nordfeldth <mmn@hethane.se>
Sat, 6 Jun 2015 18:01:03 +0000 (20:01 +0200)
committerMikael Nordfeldth <mmn@hethane.se>
Sat, 6 Jun 2015 18:01:03 +0000 (20:01 +0200)
classes/GS_DataObject.php

index 2d196026a4af0857bcf181f71cf5f2c9b86efdf1..4ca2436eec8df941c44f141e3becaf8e9fb94350 100644 (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