Avoid error when image couldn't be fetched
This commit is contained in:
parent
bf7df13855
commit
3ce4a1fee4
1 changed files with 1 additions and 1 deletions
|
@ -59,7 +59,7 @@ class ExternalResource implements ICanReadFromStorage
|
|||
} catch (Exception $exception) {
|
||||
throw new ReferenceStorageException(sprintf('External resource failed to get %s', $reference), $exception->getCode(), $exception);
|
||||
}
|
||||
if ($fetchResult->isSuccess()) {
|
||||
if (!empty($fetchResult) && $fetchResult->isSuccess()) {
|
||||
Logger::debug('Got picture', ['Content-Type' => $fetchResult->getHeader('Content-Type'), 'uid' => $data->uid, 'url' => $data->url]);
|
||||
return $fetchResult->getBody();
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue