FIX: Boolean ’t’/‘f’ strings need to be coerced to int properly.

This commit is contained in:
Sam Minnee 2019-01-23 13:50:32 +13:00
parent 0d9fcabc80
commit 32a0aad720

View File

@ -80,9 +80,13 @@ class PostgreSQLQuery extends Query
$record[$k] = $v;
$type = pg_field_type($this->handle, $i);
if (isset(self::$typeMapping[$type])) {
if ($type === 'bool' && $record[$k] === 't') {
$record[$k] = 1;
} else {
settype($record[$k], self::$typeMapping[$type]);
}
}
}
return $record;
}