Merge pull request #12735 from MrPetovan/bug/fatal-errors

Address a couple of Fatal errors
This commit is contained in:
Michael Vogel
2023-01-27 08:55:27 +01:00
committed by GitHub
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -583,7 +583,7 @@ class Photo
$photo_failure = false;
$filename = basename($image_url);
if (!empty($image_url)) {
if (!empty($image_url) && @parse_url($image_url, PHP_URL_HOST)) {
$ret = DI::httpClient()->get($image_url, HttpClientAccept::IMAGE);
Logger::debug('Got picture', ['Content-Type' => $ret->getHeader('Content-Type'), 'url' => $image_url]);
$img_str = $ret->getBody();