diff options
author | Thomas Citharel <tcit@tcit.fr> | 2016-03-16 22:47:12 +0100 |
---|---|---|
committer | Thomas Citharel <tcit@tcit.fr> | 2016-03-16 22:47:12 +0100 |
commit | bc2b947cd54e49a03c267f3c0f13dc5b8a04d962 (patch) | |
tree | 60297ba36d01f9ae25dad3febf3f7d54000d52cf | |
parent | 0cd0d6eb8c5a7a6ba04f1086b16f9612acbc9b68 (diff) | |
download | wallabag-bc2b947cd54e49a03c267f3c0f13dc5b8a04d962.tar.gz wallabag-bc2b947cd54e49a03c267f3c0f13dc5b8a04d962.tar.zst wallabag-bc2b947cd54e49a03c267f3c0f13dc5b8a04d962.zip |
add check
-rw-r--r-- | src/Wallabag/ApiBundle/Controller/WallabagRestController.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php index a590dda1..744e1a60 100644 --- a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php +++ b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php | |||
@@ -126,9 +126,13 @@ class WallabagRestController extends FOSRestController | |||
126 | $this->get('wallabag_core.content_proxy')->assignTagsToEntry($entry, $tags); | 126 | $this->get('wallabag_core.content_proxy')->assignTagsToEntry($entry, $tags); |
127 | } | 127 | } |
128 | 128 | ||
129 | $entry->setStarred((bool) $isStarred); | 129 | if (!is_null($isStarred)) { |
130 | $entry->setStarred((bool) $isStarred); | ||
131 | } | ||
130 | 132 | ||
131 | $entry->setArchived((bool) $isArchived); | 133 | if (!is_null($isArchived)) { |
134 | $entry->setArchived((bool) $isArchived); | ||
135 | } | ||
132 | 136 | ||
133 | $em = $this->getDoctrine()->getManager(); | 137 | $em = $this->getDoctrine()->getManager(); |
134 | $em->persist($entry); | 138 | $em->persist($entry); |