diff --git a/code/PostgreSQLQuery.php b/code/PostgreSQLQuery.php index d372d3c..9d658b0 100644 --- a/code/PostgreSQLQuery.php +++ b/code/PostgreSQLQuery.php @@ -80,7 +80,11 @@ public function nextRecord() $record[$k] = $v; $type = pg_field_type($this->handle, $i); if (isset(self::$typeMapping[$type])) { - settype($record[$k], self::$typeMapping[$type]); + if ($type === 'bool' && $record[$k] === 't') { + $record[$k] = 1; + } else { + settype($record[$k], self::$typeMapping[$type]); + } } }