mirror of
https://github.com/silverstripe/silverstripe-postgresql
synced 2024-10-22 17:05:45 +02:00
MINOR: Add comment to explain ‘f’ coercion.
Follow-up to https://github.com/silverstripe/silverstripe-postgresql/pull/93
This commit is contained in:
parent
f85b46d047
commit
fd27c17a80
@ -82,6 +82,8 @@ class PostgreSQLQuery extends Query
|
|||||||
if (isset(self::$typeMapping[$type])) {
|
if (isset(self::$typeMapping[$type])) {
|
||||||
if ($type === 'bool' && $record[$k] === 't') {
|
if ($type === 'bool' && $record[$k] === 't') {
|
||||||
$record[$k] = 1;
|
$record[$k] = 1;
|
||||||
|
|
||||||
|
// Note that boolean 'f' will be converted to 0 by this
|
||||||
} else {
|
} else {
|
||||||
settype($record[$k], self::$typeMapping[$type]);
|
settype($record[$k], self::$typeMapping[$type]);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user