From 11a452813c5c048174f0d827c2a171bb53520d0a Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Tue, 9 Feb 2016 14:18:55 +0100 Subject: [PATCH] use booleans instead of empty --- .../ApiBundle/Controller/WallabagRestController.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php index ad85a1779..28145e450 100644 --- a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php +++ b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php @@ -124,12 +124,12 @@ class WallabagRestController extends FOSRestController $this->get('wallabag_core.content_proxy')->assignTagsToEntry($entry, $tags); } - if (!empty($isStarred)) { - $entry->setStarred($isStarred); + if (true === (bool) $isStarred) { + $entry->setStarred(true); } - if (!empty($isArchived)) { - $entry->setArchived($isArchived); + if (true === (bool) $isArchived) { + $entry->setArchived(true); } if (!empty($content)) {