]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
joinAdd calls DB_DataObject::factory directly so no GS_DataObject override
authorMikael Nordfeldth <mmn@hethane.se>
Sat, 6 Jun 2015 17:41:23 +0000 (19:41 +0200)
committerMikael Nordfeldth <mmn@hethane.se>
Sat, 6 Jun 2015 17:41:23 +0000 (19:41 +0200)
classes/GS_DataObject.php

index 6d4873639e421268856c0c38535165b2fab346f4..47125f243872f8907ee63f88a8a8d42a5bd61740 100644 (file)
@@ -137,6 +137,20 @@ class GS_DataObject extends DB_DataObject
         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)
+    {
+        // avoid those annoying PEAR::DB strict standards warnings it causes
+        $old = error_reporting();
+        error_reporting(error_reporting() & ~E_STRICT);
+
+        $res = parent::joinAdd($obj, $joinType, $joinAs, $joinCol);
+
+        // reset
+        error_reporting($old);
+        return $res;
+    }
+
     public function links()
     {
         // avoid those annoying PEAR::DB strict standards warnings it causes