From: withoutaname Date: Thu, 15 May 2014 05:52:24 +0000 (-0700) Subject: Fetch string to pass through writeTemporary() in DatabaseOracle.php X-Git-Tag: 1.31.0-rc.0~15408^2 X-Git-Url: http://git.cyclocoop.org//%22javascript:ModifierStyle%28%27%22.%24id.%22%27%29/%22?a=commitdiff_plain;h=176213b89849f849e2c8dad2f0a79747b18a8b9d;p=lhc%2Fweb%2Fwiklou.git Fetch string to pass through writeTemporary() in DatabaseOracle.php Pulled some code from insertOneRow() to fix the update() function and prevent the error warnings in bugzilla 64970 from showing up. Note that since insertOneRow() and update() contains a lot of duplicate code, they may be candidates for merging, but that is outside the scope of this request. Bug: 64970 Change-Id: I9ff9077d68e77f05f878fc541f87e0a5ce86ecc2 --- diff --git a/includes/db/DatabaseOracle.php b/includes/db/DatabaseOracle.php index 396de4f6f3..768601067e 100644 --- a/includes/db/DatabaseOracle.php +++ b/includes/db/DatabaseOracle.php @@ -1491,6 +1491,10 @@ class DatabaseOracle extends DatabaseBase { throw new DBUnexpectedError( $this, "Cannot create LOB descriptor: " . $e['message'] ); } + if ( is_object( $val ) ) { + $val = $val->getData(); + } + if ( $col_type == 'BLOB' ) { $lob[$col]->writeTemporary( $val ); oci_bind_by_name( $stmt, ":$col", $lob[$col], -1, SQLT_BLOB );