From: Mikael Nordfeldth Date: Sat, 6 Jun 2015 17:41:23 +0000 (+0200) Subject: joinAdd calls DB_DataObject::factory directly so no GS_DataObject override X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=06503cc11b28a64067740adc265042cc9f6f4307;p=quix0rs-gnu-social.git joinAdd calls DB_DataObject::factory directly so no GS_DataObject override --- diff --git a/classes/GS_DataObject.php b/classes/GS_DataObject.php index 6d4873639e..47125f2438 100644 --- a/classes/GS_DataObject.php +++ b/classes/GS_DataObject.php @@ -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