]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
add check 1791/head
authorThomas Citharel <tcit@tcit.fr>
Wed, 16 Mar 2016 21:47:12 +0000 (22:47 +0100)
committerThomas Citharel <tcit@tcit.fr>
Wed, 16 Mar 2016 21:47:12 +0000 (22:47 +0100)
src/Wallabag/ApiBundle/Controller/WallabagRestController.php

index a590dda1f9479bc1ae13c62d67b49ad12fa14a07..744e1a601547b3d968c060dc3657007b1c3c6ce5 100644 (file)
@@ -126,9 +126,13 @@ class WallabagRestController extends FOSRestController
             $this->get('wallabag_core.content_proxy')->assignTagsToEntry($entry, $tags);
         }
 
-        $entry->setStarred((bool) $isStarred);
+        if (!is_null($isStarred)) {
+            $entry->setStarred((bool) $isStarred);
+        }
 
-        $entry->setArchived((bool) $isArchived);
+        if (!is_null($isArchived)) {
+            $entry->setArchived((bool) $isArchived);
+        }
 
         $em = $this->getDoctrine()->getManager();
         $em->persist($entry);