aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorKevin Decherf <kevin@kdecherf.com>2018-01-07 17:25:26 +0100
committerKevin Decherf <kevin@kdecherf.com>2018-10-21 16:13:20 +0200
commit4a81360efcdfe4bab8d75f7227c9cf5bfd514189 (patch)
tree2819e5cf565f13a2b2f001ba19cdd5f00c900362
parentae4f7dceec030439d3c05cc3ab3223764a62e0f6 (diff)
downloadwallabag-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>
-rw-r--r--src/Wallabag/CoreBundle/Helper/ContentProxy.php8
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