diff options
| author | 2025-01-10 08:13:09 +0100 | |
|---|---|---|
| committer | 2025-01-10 08:13:09 +0100 | |
| commit | 5368f38753a3e655ed3d7d7dfc7af2cc22de7980 (patch) | |
| tree | decb975aa750660cea965bf61399df2335493b9d /app/Models/EntryDAOSQLite.php | |
| parent | 3280ec617f8081bf0d5349e441ae564a42fdc500 (diff) | |
Reduce undeeded use of elvis operator ?: (#7204)
Diffstat (limited to 'app/Models/EntryDAOSQLite.php')
| -rw-r--r-- | app/Models/EntryDAOSQLite.php | 3 |
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); |
