]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/ImportBundle/Import/PocketImport.php
Validate imported entry to avoid error on import
[github/wallabag/wallabag.git] / src / Wallabag / ImportBundle / Import / PocketImport.php
index c1b35b7ef028a0e261d9a072e867246eca4816eb..d364338996a652c83684d4d44ce39d960d77364d 100644 (file)
@@ -168,6 +168,18 @@ class PocketImport extends AbstractImport
         $this->client = $client;
     }
 
+    /**
+     * {@inheritdoc}
+     */
+    public function validateEntry(array $importedEntry)
+    {
+        if (empty($importedEntry['resolved_url']) && empty($importedEntry['given_url'])) {
+            return false;
+        }
+
+        return true;
+    }
+
     /**
      * {@inheritdoc}
      *