Skip to content

Commit

Permalink
MINOR: Add comment to explain ‘f’ coercion.
Browse files Browse the repository at this point in the history
Follow-up to #93
  • Loading branch information
Sam Minnee committed Jan 23, 2019
1 parent f85b46d commit fd27c17
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions code/PostgreSQLQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ public function nextRecord()
if (isset(self::$typeMapping[$type])) {
if ($type === 'bool' && $record[$k] === 't') {
$record[$k] = 1;

// Note that boolean 'f' will be converted to 0 by this
} else {
settype($record[$k], self::$typeMapping[$type]);
}
Expand Down

0 comments on commit fd27c17

Please sign in to comment.