aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Wallabag/ImportBundle/Import/BrowserImport.php2
-rw-r--r--src/Wallabag/ImportBundle/Import/InstapaperImport.php6
-rw-r--r--src/Wallabag/ImportBundle/Import/ReadabilityImport.php2
-rw-r--r--src/Wallabag/ImportBundle/Import/WallabagImport.php2
4 files changed, 12 insertions, 0 deletions
diff --git a/src/Wallabag/ImportBundle/Import/BrowserImport.php b/src/Wallabag/ImportBundle/Import/BrowserImport.php
index e15443c4..9d75685b 100644
--- a/src/Wallabag/ImportBundle/Import/BrowserImport.php
+++ b/src/Wallabag/ImportBundle/Import/BrowserImport.php
@@ -45,6 +45,8 @@ abstract class BrowserImport extends AbstractImport
45 $data = json_decode(file_get_contents($this->filepath), true); 45 $data = json_decode(file_get_contents($this->filepath), true);
46 46
47 if (empty($data)) { 47 if (empty($data)) {
48 $this->logger->error('Wallabag Browser: no entries in imported file');
49
48 return false; 50 return false;
49 } 51 }
50 52
diff --git a/src/Wallabag/ImportBundle/Import/InstapaperImport.php b/src/Wallabag/ImportBundle/Import/InstapaperImport.php
index 356acf23..cf4c785c 100644
--- a/src/Wallabag/ImportBundle/Import/InstapaperImport.php
+++ b/src/Wallabag/ImportBundle/Import/InstapaperImport.php
@@ -80,6 +80,12 @@ class InstapaperImport extends AbstractImport
80 } 80 }
81 fclose($handle); 81 fclose($handle);
82 82
83 if (empty($entries)) {
84 $this->logger->error('InstapaperImport: no entries in imported file');
85
86 return false;
87 }
88
83 if ($this->producer) { 89 if ($this->producer) {
84 $this->parseEntriesForProducer($entries); 90 $this->parseEntriesForProducer($entries);
85 91
diff --git a/src/Wallabag/ImportBundle/Import/ReadabilityImport.php b/src/Wallabag/ImportBundle/Import/ReadabilityImport.php
index fa2b7053..b8c0f777 100644
--- a/src/Wallabag/ImportBundle/Import/ReadabilityImport.php
+++ b/src/Wallabag/ImportBundle/Import/ReadabilityImport.php
@@ -64,6 +64,8 @@ class ReadabilityImport extends AbstractImport
64 $data = json_decode(file_get_contents($this->filepath), true); 64 $data = json_decode(file_get_contents($this->filepath), true);
65 65
66 if (empty($data) || empty($data['bookmarks'])) { 66 if (empty($data) || empty($data['bookmarks'])) {
67 $this->logger->error('ReadabilityImport: no entries in imported file');
68
67 return false; 69 return false;
68 } 70 }
69 71
diff --git a/src/Wallabag/ImportBundle/Import/WallabagImport.php b/src/Wallabag/ImportBundle/Import/WallabagImport.php
index 3754e4a9..702da057 100644
--- a/src/Wallabag/ImportBundle/Import/WallabagImport.php
+++ b/src/Wallabag/ImportBundle/Import/WallabagImport.php
@@ -58,6 +58,8 @@ abstract class WallabagImport extends AbstractImport
58 $data = json_decode(file_get_contents($this->filepath), true); 58 $data = json_decode(file_get_contents($this->filepath), true);
59 59
60 if (empty($data)) { 60 if (empty($data)) {
61 $this->logger->error('WallabagImport: no entries in imported file');
62
61 return false; 63 return false;
62 } 64 }
63 65