]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/ApiBundle/Controller/WallabagRestController.php
add check
[github/wallabag/wallabag.git] / src / Wallabag / ApiBundle / Controller / WallabagRestController.php
index d0a35013850c3794c6582205fd0befc5b1c46620..744e1a601547b3d968c060dc3657007b1c3c6ce5 100644 (file)
@@ -126,12 +126,12 @@ class WallabagRestController extends FOSRestController
             $this->get('wallabag_core.content_proxy')->assignTagsToEntry($entry, $tags);
         }
 
-        if (true === (bool) $isStarred) {
-            $entry->setStarred(true);
+        if (!is_null($isStarred)) {
+            $entry->setStarred((bool) $isStarred);
         }
 
-        if (true === (bool) $isArchived) {
-            $entry->setArchived(true);
+        if (!is_null($isArchived)) {
+            $entry->setArchived((bool) $isArchived);
         }
 
         $em = $this->getDoctrine()->getManager();