aboutsummaryrefslogtreecommitdiff
path: root/app/Models/EntryDAO.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2022-01-01 11:26:56 +0100
committerGravatar GitHub <noreply@github.com> 2022-01-01 11:26:56 +0100
commit3f6aa42b817145a3b00f4d615f87728b55c4413a (patch)
treee5b31941b0acc3a2f4c47e4846afcfe987b9852f /app/Models/EntryDAO.php
parent77e9877316fcfacb26799afdf32d94c8411da80e (diff)
Fix most PHPDocs errors (#4107)
Contributes to https://github.com/FreshRSS/FreshRSS/issues/4103 https://phpstan.org/writing-php-code/phpdoc-types
Diffstat (limited to 'app/Models/EntryDAO.php')
-rw-r--r--app/Models/EntryDAO.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/Models/EntryDAO.php b/app/Models/EntryDAO.php
index 7b7f5f53e..2e4f52d0b 100644
--- a/app/Models/EntryDAO.php
+++ b/app/Models/EntryDAO.php
@@ -546,7 +546,7 @@ SQL;
* @param integer $idMax max article ID
* @return integer affected rows
*/
- public function markReadTag($id = '', $idMax = 0, $filters = null, $state = 0, $is_read = true) {
+ public function markReadTag($id = 0, $idMax = 0, $filters = null, $state = 0, $is_read = true) {
FreshRSS_UserDAO::touch();
if ($idMax == 0) {
$idMax = time() . '000000';
@@ -556,10 +556,10 @@ SQL;
$sql = 'UPDATE `_entry` e INNER JOIN `_entrytag` et ON et.id_entry = e.id '
. 'SET e.is_read = ? '
. 'WHERE '
- . ($id == '' ? '' : 'et.id_tag = ? AND ')
+ . ($id == 0 ? '' : 'et.id_tag = ? AND ')
. 'e.is_read <> ? AND e.id <= ?';
$values = array($is_read ? 1 : 0);
- if ($id != '') {
+ if ($id != 0) {
$values[] = $id;
}
$values[] = $is_read ? 1 : 0;