Need to catch 't' and 'f' (with quotes) as boolean values
authorChuck Hagenbuch <chuck@horde.org>
Sun, 13 Dec 2009 20:35:49 +0000 (15:35 -0500)
committerChuck Hagenbuch <chuck@horde.org>
Sun, 13 Dec 2009 20:35:49 +0000 (15:35 -0500)
framework/Db/lib/Horde/Db/Adapter/Sqlite/Column.php

index e74fe6d..aa4dd44 100644 (file)
@@ -53,6 +53,19 @@ class Horde_Db_Adapter_Sqlite_Column extends Horde_Db_Adapter_Base_Column
         return str_replace(array('%00', '%25'), array("\0", '%'), $value);
     }
 
+    /**
+     * @param   mixed  $value
+     * @return  boolean
+     */
+    public function valueToBoolean($value)
+    {
+        if ($value == '"t"' || $value == "'t'") {
+            return true;
+        } else {
+            return parent::valueToBoolean($value);
+        }
+    }
+
 
     /*##########################################################################
     # Protected