Review 10.4 Merged

69772[BUGFIX] Handle invalid source string correctly in ImageService

Oli Bartsch CR +2 V +2 Easy +8 −3 updated 07/09/21, 09:12

Commit message

The ImageService->getImageFromSourceString() tries
to retrieve a FileInterface from a given source string,
e.g. with the "EXT:" prefix. However, because the used
ResourceFactory->retrieveFileOrFolderObject() method
can also return a FolderInterface or NULL, this must be
handled to prevent a TypeError.

Therefore, the final $image value is now checked for being
a FileInterface. Otherwise NULL is returned, which is then
handled with a custom exception in the calling `getImage()`
method.

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 1

Files 1