aboutsummaryrefslogtreecommitdiff
path: root/app/Models/EntryDAO.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2025-01-10 08:13:09 +0100
committerGravatar GitHub <noreply@github.com> 2025-01-10 08:13:09 +0100
commit5368f38753a3e655ed3d7d7dfc7af2cc22de7980 (patch)
treedecb975aa750660cea965bf61399df2335493b9d /app/Models/EntryDAO.php
parent3280ec617f8081bf0d5349e441ae564a42fdc500 (diff)
Reduce undeeded use of elvis operator ?: (#7204)
Diffstat (limited to 'app/Models/EntryDAO.php')
-rw-r--r--app/Models/EntryDAO.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/Models/EntryDAO.php b/app/Models/EntryDAO.php
index c169e0e24..af229df54 100644
--- a/app/Models/EntryDAO.php
+++ b/app/Models/EntryDAO.php
@@ -1427,9 +1427,9 @@ SQL;
/**
* @param array<string> $guids
- * @return array<string,string>|false
+ * @return array<string,string> guid => hash
*/
- public function listHashForFeedGuids(int $id_feed, array $guids): array|false {
+ public function listHashForFeedGuids(int $id_feed, array $guids): array {
$result = [];
if (count($guids) < 1) {
return $result;
@@ -1437,7 +1437,7 @@ SQL;
// Split a query with too many variables parameters
$guidsChunks = array_chunk($guids, FreshRSS_DatabaseDAO::MAX_VARIABLE_NUMBER);
foreach ($guidsChunks as $guidsChunk) {
- $result += $this->listHashForFeedGuids($id_feed, $guidsChunk) ?: [];
+ $result += $this->listHashForFeedGuids($id_feed, $guidsChunk);
}
return $result;
}
@@ -1457,7 +1457,7 @@ SQL;
$info = $stm === false ? $this->pdo->errorInfo() : $stm->errorInfo();
Minz_Log::error('SQL error ' . __METHOD__ . json_encode($info)
. ' while querying feed ' . $id_feed);
- return false;
+ return [];
}
}