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/DatabaseDAOSQLite.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'app/Models/DatabaseDAOSQLite.php') diff --git a/app/Models/DatabaseDAOSQLite.php b/app/Models/DatabaseDAOSQLite.php index f59f6c9ae..c425135b5 100644 --- a/app/Models/DatabaseDAOSQLite.php +++ b/app/Models/DatabaseDAOSQLite.php @@ -37,10 +37,9 @@ class FreshRSS_DatabaseDAOSQLite extends FreshRSS_DatabaseDAO { public function getSchema(string $table): array { $sql = 'PRAGMA table_info(' . $table . ')'; $stm = $this->pdo->query($sql); - if ($stm !== false) { - $res = $stm->fetchAll(PDO::FETCH_ASSOC); + if ($stm !== false && ($res = $stm->fetchAll(PDO::FETCH_ASSOC)) !== false) { /** @var list $res */ - return $this->listDaoToSchema($res ?: []); + return $this->listDaoToSchema($res); } return []; } -- cgit v1.2.3