HomePhorge

Improve messages when no image formats are supported (due to GD not installed)

Description

Improve messages when no image formats are supported (due to GD not installed)

Summary:
When GD is not installed, trying to set a custom image for a project/blog/repository/user/etc displays unhelpful error messages (This server only supports these image formats: . and Supported formats: ) due to the array of supported image formats being empty.

Display clearer messages instead.

Closes T15720

Test Plan: Do not have php-gd installed, go to /project/manage/1/, take a look at the string below the "Upload Picture" button, select Edit Picture in the sidebar, select Custom: Choose Icon and Color..., Choose Background Color and Choose Icon, then click the Save Image button. Also try to upload a custom image and look at the error message.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T15720

Differential Revision: https://we.phorge.it/D25525