From 8bff77c45ef87322fce0854e6f189f76604f5b93 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Wed, 6 Dec 2023 08:51:42 +0100 Subject: Fix export (#5927) Regression from https://github.com/FreshRSS/FreshRSS/pull/5830 --- app/Models/DatabaseDAO.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'app/Models/DatabaseDAO.php') diff --git a/app/Models/DatabaseDAO.php b/app/Models/DatabaseDAO.php index 05ca98355..7dbe1db3f 100644 --- a/app/Models/DatabaseDAO.php +++ b/app/Models/DatabaseDAO.php @@ -407,4 +407,17 @@ SQL; } } } + + /** + * Ensure that some PDO columns are `string` and not `bigint`. + * @param array $table + * @param array $columns + */ + public static function pdoString(array &$table, array $columns): void { + foreach ($columns as $column) { + if (isset($table[$column])) { + $table[$column] = (string)$table[$column]; + } + } + } } -- cgit v1.2.3