aboutsummaryrefslogtreecommitdiff
path: root/p/api/greader.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2023-04-28 14:01:11 +0200
committerGravatar GitHub <noreply@github.com> 2023-04-28 14:01:11 +0200
commitc72914bba2363e436574204b3d6093a6f3cfce89 (patch)
tree377008a7393e4d80e4c8659f27dd42c0ccbab382 /p/api/greader.php
parent26e2a703125ffe1d0d2746b0e5ea3491b627832c (diff)
PHPStan Level 7 for more DAO PDO (#5328)
* PHPStan Level 7 for more DAO PDO With new function to address common type and check problems * A bit more * PHPStan Level 7 for FreshRSS_Entry
Diffstat (limited to 'p/api/greader.php')
-rw-r--r--p/api/greader.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/p/api/greader.php b/p/api/greader.php
index f1cb7d615..34b74fd19 100644
--- a/p/api/greader.php
+++ b/p/api/greader.php
@@ -746,7 +746,7 @@ final class GReaderAPI {
$entryDAO = FreshRSS_Factory::createEntryDao();
$ids = $entryDAO->listIdsWhere($type, $id, $state, $order === 'o' ? 'ASC' : 'DESC', $count, $continuation, $searches);
- if ($ids === false) {
+ if ($ids == null) {
self::internalServerError();
}
@@ -898,13 +898,15 @@ final class GReaderAPI {
$categoryDAO = FreshRSS_Factory::createCategoryDao();
$cat = $categoryDAO->searchByName($s);
if ($cat != null) {
- $categoryDAO->updateCategory($cat->id(), array('name' => $dest));
+ $categoryDAO->updateCategory($cat->id(), [
+ 'name' => $dest, 'kind' => $cat->kind(), 'attributes' => $cat->attributes()
+ ]);
exit('OK');
} else {
$tagDAO = FreshRSS_Factory::createTagDao();
$tag = $tagDAO->searchByName($s);
if ($tag != null) {
- $tagDAO->updateTag($tag->id(), array('name' => $dest));
+ $tagDAO->updateTagName($tag->id(), $dest);
exit('OK');
}
}