aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorKevin Decherf <kevin@kdecherf.com>2018-01-07 17:25:26 +0100
committerKevin Decherf <kevin@kdecherf.com>2018-01-14 16:37:03 +0100
commit3362b3e3d340e6e24d703b38010870479ab0f67c (patch)
tree5bd54d2a2a6a307e6a592e230dfb2f5b87ad1cd8
parentfd637b9a5af28d432f775297ff19ba3f779d55b2 (diff)
downloadwallabag-3362b3e3d340e6e24d703b38010870479ab0f67c.tar.gz
wallabag-3362b3e3d340e6e24d703b38010870479ab0f67c.tar.zst
wallabag-3362b3e3d340e6e24d703b38010870479ab0f67c.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 fe795d42..19fcbfbf 100644
--- a/src/Wallabag/CoreBundle/Helper/ContentProxy.php
+++ b/src/Wallabag/CoreBundle/Helper/ContentProxy.php
@@ -65,6 +65,14 @@ class ContentProxy
65 // so we'll be able to refetch it in the future 65 // so we'll be able to refetch it in the future
66 $content['url'] = !empty($content['url']) ? $content['url'] : $url; 66 $content['url'] = !empty($content['url']) ? $content['url'] : $url;
67 67
68 // In one case (at least in tests), url is empty here
69 // so we set it using $url provided in the updateEntry call.
70 // Not sure what are the other possible cases where this property is empty
71 if (empty($entry->getUrl()) && !empty($url))
72 {
73 $entry->setUrl($url);
74 }
75
68 $this->stockEntry($entry, $content); 76 $this->stockEntry($entry, $content);
69 } 77 }
70 78