do not choke if photo_factory() returns null

This commit is contained in:
Mario Vavti
2017-01-15 13:23:28 +01:00
parent e843d27f8c
commit a36d74dad5
2 changed files with 7 additions and 1 deletions

View File

@@ -11,8 +11,10 @@ function photo_factory($data, $type = null) {
'image/svg+xml'
);
if($type && in_array(strtolower($type),$unsupported_types))
if($type && in_array(strtolower($type),$unsupported_types)) {
logger('photo_factory: unsupported image type');
return null;
}
$ignore_imagick = get_config('system', 'ignore_imagick');