ContentProxy: fix a corner case when entry.url is empty in updateEntry

Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
This commit is contained in:
Kevin Decherf 2018-01-07 17:25:26 +01:00
parent ae4f7dceec
commit 4a81360efc

View file

@ -66,6 +66,14 @@ class ContentProxy
// so we'll be able to refetch it in the future
$content['url'] = !empty($content['url']) ? $content['url'] : $url;
// In one case (at least in tests), url is empty here
// so we set it using $url provided in the updateEntry call.
// Not sure what are the other possible cases where this property is empty
if (empty($entry->getUrl()) && !empty($url))
{
$entry->setUrl($url);
}
$this->stockEntry($entry, $content);
}