From: Thomas Citharel Date: Wed, 16 Mar 2016 21:47:12 +0000 (+0100) Subject: add check X-Git-Tag: 2.0.0~22^2 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=bc2b947cd54e49a03c267f3c0f13dc5b8a04d962;p=github%2Fwallabag%2Fwallabag.git add check --- 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 $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);