aboutsummaryrefslogtreecommitdiff
path: root/app/Models/EntryDAOSQLite.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Models/EntryDAOSQLite.php')
-rw-r--r--app/Models/EntryDAOSQLite.php3
1 files changed, 1 insertions, 2 deletions
diff --git a/app/Models/EntryDAOSQLite.php b/app/Models/EntryDAOSQLite.php
index e4cb9727e..99e216e53 100644
--- a/app/Models/EntryDAOSQLite.php
+++ b/app/Models/EntryDAOSQLite.php
@@ -57,8 +57,7 @@ class FreshRSS_EntryDAOSQLite extends FreshRSS_EntryDAO {
/** @param array{0:string,1:int,2:string} $errorInfo */
#[\Override]
protected function autoUpdateDb(array $errorInfo): bool {
- if (($tableInfo = $this->pdo->query("PRAGMA table_info('entry')")) !== false) {
- $columns = $tableInfo->fetchAll(PDO::FETCH_COLUMN, 1) ?: [];
+ if (($tableInfo = $this->pdo->query("PRAGMA table_info('entry')")) !== false && ($columns = $tableInfo->fetchAll(PDO::FETCH_COLUMN, 1)) !== false) {
foreach (['attributes'] as $column) {
if (!in_array($column, $columns, true)) {
return $this->addColumn($column);