1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-09-15 18:57:05 +00:00

Merge remote-tracking branch 'origin/master' into 2.3

This commit is contained in:
Jeremy Benoist 2017-05-19 11:25:19 +02:00
commit 4ab0d25f65
No known key found for this signature in database
GPG key ID: BCA73962457ACC3C
23 changed files with 727 additions and 604 deletions

View file

@ -297,10 +297,19 @@ class EntryRestController extends WallabagRestController
$entry = $this->get('wallabag_core.entry_repository')->findByUrlAndUserId($url, $this->getUser()->getId());
if (false === $entry) {
$entry = $this->get('wallabag_core.content_proxy')->updateEntry(
new Entry($this->getUser()),
$url
);
$entry = new Entry($this->getUser());
try {
$entry = $this->get('wallabag_core.content_proxy')->updateEntry(
$entry,
$url
);
} catch (\Exception $e) {
$this->get('logger')->error('Error while saving an entry', [
'exception' => $e,
'entry' => $entry,
]);
$entry->setUrl($url);
}
}
if (!is_null($title)) {