aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/ApiBundle/Controller
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2017-05-19 11:25:19 +0200
committerJeremy Benoist <jeremy.benoist@gmail.com>2017-05-19 11:25:19 +0200
commit4ab0d25f652bdfe184046be6d50afd594709e1a9 (patch)
tree0a9ea39836619df4b97d4b12bb6a0384e8c2a5ee /src/Wallabag/ApiBundle/Controller
parent21f78f4d4baae7afaa5845317a9cb52e031f1d1a (diff)
parentf87e6547e8c49a2fe4bd21ec185e99464d4d957e (diff)
downloadwallabag-4ab0d25f652bdfe184046be6d50afd594709e1a9.tar.gz
wallabag-4ab0d25f652bdfe184046be6d50afd594709e1a9.tar.zst
wallabag-4ab0d25f652bdfe184046be6d50afd594709e1a9.zip
Merge remote-tracking branch 'origin/master' into 2.3
Diffstat (limited to 'src/Wallabag/ApiBundle/Controller')
-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 632b16d9..4801811d 100644
--- a/src/Wallabag/ApiBundle/Controller/EntryRestController.php
+++ b/src/Wallabag/ApiBundle/Controller/EntryRestController.php
@@ -297,10 +297,19 @@ class EntryRestController extends WallabagRestController
297 $entry = $this->get('wallabag_core.entry_repository')->findByUrlAndUserId($url, $this->getUser()->getId()); 297 $entry = $this->get('wallabag_core.entry_repository')->findByUrlAndUserId($url, $this->getUser()->getId());
298 298
299 if (false === $entry) { 299 if (false === $entry) {
300 $entry = $this->get('wallabag_core.content_proxy')->updateEntry( 300 $entry = new Entry($this->getUser());
301 new Entry($this->getUser()), 301 try {
302 $url 302 $entry = $this->get('wallabag_core.content_proxy')->updateEntry(
303 ); 303 $entry,
304 $url
305 );
306 } catch (\Exception $e) {
307 $this->get('logger')->error('Error while saving an entry', [
308 'exception' => $e,
309 'entry' => $entry,
310 ]);
311 $entry->setUrl($url);
312 }
304 } 313 }
305 314
306 if (!is_null($title)) { 315 if (!is_null($title)) {