projects
/
horde.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
549e2c2
)
Another place to fix BYTEA conversion
author
Michael M Slusarz
<slusarz@curecanti.org>
Fri, 28 Jan 2011 20:13:03 +0000
(13:13 -0700)
committer
Michael M Slusarz
<slusarz@curecanti.org>
Fri, 28 Jan 2011 20:14:47 +0000
(13:14 -0700)
turba/lib/Driver/Sql.php
patch
|
blob
|
history
diff --git
a/turba/lib/Driver/Sql.php
b/turba/lib/Driver/Sql.php
index
3803082
..
79c1e0e
100644
(file)
--- a/
turba/lib/Driver/Sql.php
+++ b/
turba/lib/Driver/Sql.php
@@
-154,8
+154,12
@@
class Turba_Driver_Sql extends Turba_Driver
if (isset($blobFields[$field])) {
switch ($this->_db->adapterName()) {
case 'PDO_PostgreSQL':
- $entry[$field] = pack('H' . strlen($val), $val);
- break;
+ if (is_resource($val)) {
+ $tmp = stream_get_contents($val);
+ fclose($val);
+ $val = $tmp;
+ }
+ // Fall-through
default:
$entry[$field] = $val;