Skip to content

Commit 7c7ac13

Browse files
peldaxdg
authored andcommitted
ResultSet: added workaround for PDO bug #38546 (#231)
https://bugs.php.net/bug.php?id=38546
1 parent 9eeebcc commit 7c7ac13

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Database/ResultSet.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public function __construct(Connection $connection, string $queryString, array $
5959
if (substr($queryString, 0, 2) === '::') {
6060
$connection->getPdo()->{substr($queryString, 2)}();
6161
} elseif ($queryString !== null) {
62-
static $types = ['boolean' => PDO::PARAM_BOOL, 'integer' => PDO::PARAM_INT,
62+
static $types = ['boolean' => PHP_VERSION < 70307 ? PDO::PARAM_INT : PDO::PARAM_BOOL, 'integer' => PDO::PARAM_INT,
6363
'resource' => PDO::PARAM_LOB, 'NULL' => PDO::PARAM_NULL, ];
6464
$this->pdoStatement = $connection->getPdo()->prepare($queryString);
6565
foreach ($params as $key => $value) {

0 commit comments

Comments
 (0)