From 5368f38753a3e655ed3d7d7dfc7af2cc22de7980 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Fri, 10 Jan 2025 08:13:09 +0100 Subject: Reduce undeeded use of elvis operator ?: (#7204) --- app/Models/EntryDAOSQLite.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'app/Models/EntryDAOSQLite.php') 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); -- cgit v1.2.3