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/CategoryDAO.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'app/Models/CategoryDAO.php') diff --git a/app/Models/CategoryDAO.php b/app/Models/CategoryDAO.php index a41d23e10..5d191f321 100644 --- a/app/Models/CategoryDAO.php +++ b/app/Models/CategoryDAO.php @@ -289,8 +289,7 @@ SQL; . 'ORDER BY c.name, f.name'; $stm = $this->pdo->prepare($sql); $values = [ ':priority' => FreshRSS_Feed::PRIORITY_CATEGORY ]; - if ($stm !== false && $stm->execute($values)) { - $res = $stm->fetchAll(PDO::FETCH_ASSOC) ?: []; + if ($stm !== false && $stm->execute($values) && ($res = $stm->fetchAll(PDO::FETCH_ASSOC)) !== false) { /** @var list $res */ return self::daoToCategoriesPrepopulated($res); -- cgit v1.2.3