]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/ImportBundle/Import/ChromeImport.php
Validate imported entry to avoid error on import
[github/wallabag/wallabag.git] / src / Wallabag / ImportBundle / Import / ChromeImport.php
index 09183abe47cbe321ed8067de34a9f816a6fde97c..eccee69869a1197c59bdf3e500953a4c6867d424 100644 (file)
@@ -30,6 +30,18 @@ class ChromeImport extends BrowserImport
         return 'import.chrome.description';
     }
 
+    /**
+     * {@inheritdoc}
+     */
+    public function validateEntry(array $importedEntry)
+    {
+        if (empty($importedEntry['url'])) {
+            return false;
+        }
+
+        return true;
+    }
+
     /**
      * {@inheritdoc}
      */