]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
use booleans instead of empty
authorThomas Citharel <tcit@tcit.fr>
Tue, 9 Feb 2016 13:18:55 +0000 (14:18 +0100)
committerJeremy Benoist <jeremy.benoist@gmail.com>
Fri, 4 Mar 2016 10:39:21 +0000 (11:39 +0100)
src/Wallabag/ApiBundle/Controller/WallabagRestController.php

index ad85a1779a7c459c43b5d94fd7821138e98528c1..28145e45081bc957670049e16b4a73b1f0fc5ad1 100644 (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)) {