Fix casting errors when using SQL shares and groups on PostgreSQL (Bug #8899).
authorJan Schneider <jan@horde.org>
Wed, 17 Mar 2010 17:18:04 +0000 (18:18 +0100)
committerJan Schneider <jan@horde.org>
Wed, 17 Mar 2010 17:25:50 +0000 (18:25 +0100)
framework/Share/Share/sql.php
framework/Share/Share/sql_hierarchical.php
horde/docs/CHANGES

index b873899..66f812e 100644 (file)
@@ -718,7 +718,7 @@ class Horde_Share_sql extends Horde_Share {
                 $ids = array_keys($groups);
                 $group_ids = array();
                 foreach ($ids as $id) {
-                    $group_ids[] = $this->_db->quote($id);
+                    $group_ids[] = $this->_db->quote((string)$id);
                 }
                 $query .= ' LEFT JOIN ' . $this->_table . '_groups g ON g.share_id = s.share_id';
                 $where .= ' OR (g.group_uid IN (' . implode(',', $group_ids) . ')'
index 0a0f262..727c0b4 100644 (file)
@@ -218,7 +218,7 @@ class Horde_Share_sql_hierarchical extends Horde_Share_sql {
                     $ids = array_keys($groups);
                     $group_ids = array();
                     foreach ($ids as $id) {
-                        $group_ids[] = $this->_db->quote($id);
+                        $group_ids[] = $this->_db->quote((string)$id);
                     }
                     $query .= ' LEFT JOIN ' . $this->_table . '_groups AS g ON g.share_id = s.share_id';
                     $where .= ' OR (g.group_uid IN (' . implode(',', $group_ids) . ')'
index d21b3fb..23eae81 100644 (file)
@@ -37,6 +37,8 @@ v4.0-cvs
 v3.3.7-cvs
 ----------
 
+[jan] Fix casting errors when using SQL shares and groups on PostgreSQL
+      (Bug #8899).
 [gwr] Allow conf.d style directory configuration overriding (Request #8172).
 [jan] Fix sending alarms to multiple users (Bug #8821).
 [mms] Fix display of S/MIME certificate data (Bug #8826).