aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag')
-rw-r--r--src/Wallabag/ApiBundle/Controller/EntryRestController.php17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/Wallabag/ApiBundle/Controller/EntryRestController.php b/src/Wallabag/ApiBundle/Controller/EntryRestController.php
index 2c2ec0c1..e9e1aca3 100644
--- a/src/Wallabag/ApiBundle/Controller/EntryRestController.php
+++ b/src/Wallabag/ApiBundle/Controller/EntryRestController.php
@@ -199,10 +199,19 @@ class EntryRestController extends WallabagRestController
199 $entry = $this->get('wallabag_core.entry_repository')->findByUrlAndUserId($url, $this->getUser()->getId()); 199 $entry = $this->get('wallabag_core.entry_repository')->findByUrlAndUserId($url, $this->getUser()->getId());
200 200
201 if (false === $entry) { 201 if (false === $entry) {
202 $entry = $this->get('wallabag_core.content_proxy')->updateEntry( 202 $entry = new Entry($this->getUser());
203 new Entry($this->getUser()), 203 try {
204 $url 204 $entry = $this->get('wallabag_core.content_proxy')->updateEntry(
205 ); 205 $entry,
206 $url
207 );
208 } catch (\Exception $e) {
209 $this->get('logger')->error('Error while saving an entry', [
210 'exception' => $e,
211 'entry' => $entry,
212 ]);
213 $entry->setUrl($url);
214 }
206 } 215 }
207 216
208 if (!is_null($title)) { 217 if (!is_null($title)) {