From 233951acd222ffe7fb23c02882968e59c7fd89f4 Mon Sep 17 00:00:00 2001 From: Rougin Gutib Date: Sun, 17 Nov 2024 17:43:38 +0800 Subject: [PATCH] Fix issue for PdoSource in PHP 8 and above --- src/Source/PdoSource.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Source/PdoSource.php b/src/Source/PdoSource.php index 1264fa8..4380a4f 100644 --- a/src/Source/PdoSource.php +++ b/src/Source/PdoSource.php @@ -114,7 +114,10 @@ public function getItems() foreach ($columns as $column) { - $row[] = $item[$column->getName()]; + // PHP 8.0 and above parses numbers as native types --- + // as opposed to pure strings prior to this version --- + $row[] = (string) $item[$column->getName()]; + // ---------------------------------------------------- } $result[] = $row;