Skip to content

Commit f33eb3f

Browse files
authored
Media types: Handle null configured file extensions when populating allowed media types (closes #20620) (#20635)
* Handle null configured file extensions when populating allowed media types. * Added clarifying comment.
1 parent e893682 commit f33eb3f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Umbraco.Core/Services/ContentTypeEditing/MediaTypeEditingService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ private async Task<IDictionary<IMediaType, IEnumerable<string>>> FetchAllowedFil
175175
continue;
176176
}
177177

178-
allowedFileExtensionsByMediaType[mediaType] = fileUploadConfiguration.FileExtensions;
178+
allowedFileExtensionsByMediaType[mediaType] = fileUploadConfiguration.FileExtensions ?? []; // Although we never expect null here, legacy data type configuration did allow it.
179179
}
180180

181181
return allowedFileExtensionsByMediaType;

0 commit comments

Comments
 (0)