summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRomain LE DISEZ <romain.git@ledisez.net>2009-07-20 10:51:07 +0200
committerRomain LE DISEZ <romain.git@ledisez.net>2009-07-20 10:51:07 +0200
commit8cbf43ed2abe9772045766e598bb9fe3d4def983 (patch)
tree5d02e7dcebddc1db021616366b5f72af4eceec6f
parentd3fa2bed687438ead8ea64b40c23f90e231b6b61 (diff)
Improve PgSQL compatibility in Kohana
( see http://dev.kohanaphp.com/issues/1855 )
-rw-r--r--system/libraries/ORM.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/system/libraries/ORM.php b/system/libraries/ORM.php
index c1048604..5196ba27 100644
--- a/system/libraries/ORM.php
+++ b/system/libraries/ORM.php
@@ -1295,7 +1295,9 @@ class ORM_Core {
$value = (float) $value;
break;
case 'boolean':
- $value = (bool) $value;
+ if ($value === "t") $value = true; // For PgSQL
+ else if ($value === "f") $value = false; // For PgSQL
+ else $value = (bool) $value;
break;
case 'string':
$value = (string) $value;