use booleans instead of empty

This commit is contained in:
Thomas Citharel 2016-02-09 14:18:55 +01:00 committed by Jeremy Benoist
parent 816ad4051b
commit 11a452813c

View file

@ -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)) {