]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/ImportBundle/Import/PocketImport.php
Improve checks & add tests
[github/wallabag/wallabag.git] / src / Wallabag / ImportBundle / Import / PocketImport.php
index a9b43993f735057b7656fe301e0baf2cda7fd018..5737928d169afd66a3456bb94c8e1d8b6b84b0e8 100644 (file)
@@ -206,10 +206,10 @@ class PocketImport extends AbstractImport
         $this->fetchContent($entry, $url);
 
         // 0, 1, 2 - 1 if the item is archived - 2 if the item should be deleted
-        $entry->setArchived(1 == $importedEntry['status'] || $this->markAsRead);
+        $entry->setArchived(1 === (int) $importedEntry['status'] || $this->markAsRead);
 
-        // 0 or 1 - 1 If the item is starred
-        $entry->setStarred(1 == $importedEntry['favorite']);
+        // 0 or 1 - 1 if the item is starred
+        $entry->setStarred(1 === (int) $importedEntry['favorite']);
 
         $title = 'Untitled';
         if (isset($importedEntry['resolved_title']) && '' !== $importedEntry['resolved_title']) {