diff options
author | Kevin Decherf <kevin@kdecherf.com> | 2018-01-07 17:25:26 +0100 |
---|---|---|
committer | Kevin Decherf <kevin@kdecherf.com> | 2018-10-21 16:13:20 +0200 |
commit | 4a81360efcdfe4bab8d75f7227c9cf5bfd514189 (patch) | |
tree | 2819e5cf565f13a2b2f001ba19cdd5f00c900362 /src/Wallabag | |
parent | ae4f7dceec030439d3c05cc3ab3223764a62e0f6 (diff) | |
download | wallabag-4a81360efcdfe4bab8d75f7227c9cf5bfd514189.tar.gz wallabag-4a81360efcdfe4bab8d75f7227c9cf5bfd514189.tar.zst wallabag-4a81360efcdfe4bab8d75f7227c9cf5bfd514189.zip |
ContentProxy: fix a corner case when entry.url is empty in updateEntry
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
Diffstat (limited to 'src/Wallabag')
-rw-r--r-- | src/Wallabag/CoreBundle/Helper/ContentProxy.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Helper/ContentProxy.php b/src/Wallabag/CoreBundle/Helper/ContentProxy.php index d4ea608f..f0d8c1b4 100644 --- a/src/Wallabag/CoreBundle/Helper/ContentProxy.php +++ b/src/Wallabag/CoreBundle/Helper/ContentProxy.php | |||
@@ -66,6 +66,14 @@ class ContentProxy | |||
66 | // so we'll be able to refetch it in the future | 66 | // so we'll be able to refetch it in the future |
67 | $content['url'] = !empty($content['url']) ? $content['url'] : $url; | 67 | $content['url'] = !empty($content['url']) ? $content['url'] : $url; |
68 | 68 | ||
69 | // In one case (at least in tests), url is empty here | ||
70 | // so we set it using $url provided in the updateEntry call. | ||
71 | // Not sure what are the other possible cases where this property is empty | ||
72 | if (empty($entry->getUrl()) && !empty($url)) | ||
73 | { | ||
74 | $entry->setUrl($url); | ||
75 | } | ||
76 | |||
69 | $this->stockEntry($entry, $content); | 77 | $this->stockEntry($entry, $content); |
70 | } | 78 | } |
71 | 79 | ||