From 10b27f68312df8af7e420315ab653a4818c29694 Mon Sep 17 00:00:00 2001 From: Ted Bowman Date: Wed, 8 Jun 2022 12:04:42 -0400 Subject: [PATCH] Do not call getColumnMeta() for out of range columns to support sqlite --- src/Utilities.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Utilities.php b/src/Utilities.php index 3c939f7..6547e54 100644 --- a/src/Utilities.php +++ b/src/Utilities.php @@ -46,7 +46,9 @@ public static function formatQuery($query) */ public static function stringToNumeric(\PDOStatement $statement, $rows) { - for ($i = 0; ($columnMeta = $statement->getColumnMeta($i)) !== false; $i++) { + $columnCount = $statement->columnCount(); + for ($i = 0; $columnCount > $i ; $i++) { + $columnMeta = $statement->getColumnMeta($i); $type = $columnMeta['native_type']; switch ($type) {