[FlickrBridge] Fix missing scheme for image URLs

References #754
This commit is contained in:
logmanoriginal 2018-07-23 20:14:38 +02:00
parent 43bb17f995
commit afb4de318b

View file

@ -149,7 +149,7 @@ class FlickrBridge extends BridgeAbstract {
$areas[$size['width'] * $size['height']] = $size['url']; $areas[$size['width'] * $size['height']] = $size['url'];
} }
return array(max($areas)); return array($this->fixURL(max($areas)));
} }
@ -168,7 +168,18 @@ class FlickrBridge extends BridgeAbstract {
} }
return min($areas); return $this->fixURL(min($areas));
}
private function fixURL($url) {
// For some reason the image URLs don't include the protocol (https)
if(strpos($url, '//') === 0) {
$url = 'https:' . $url;
}
return $url;
} }