]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/ImportBundle/Import/ChromeImport.php
Merge remote-tracking branch 'origin/master' into 2.4
[github/wallabag/wallabag.git] / src / Wallabag / ImportBundle / Import / ChromeImport.php
index 09183abe47cbe321ed8067de34a9f816a6fde97c..4ae82ade86f15fb0473141e8251b3d91163dff49 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}
      */
@@ -45,7 +57,7 @@ class ChromeImport extends BrowserImport
             'created_at' => substr($entry['date_added'], 0, 10),
         ];
 
-        if (array_key_exists('tags', $entry) && '' !== $entry['tags']) {
+        if (\array_key_exists('tags', $entry) && '' !== $entry['tags']) {
             $data['tags'] = $entry['tags'];
         }