Page MenuHomePhorge

D25515.1737754311.diff
No OneTemporary

D25515.1737754311.diff

diff --git a/src/applications/files/builtin/PhabricatorFilesComposeIconBuiltinFile.php b/src/applications/files/builtin/PhabricatorFilesComposeIconBuiltinFile.php
--- a/src/applications/files/builtin/PhabricatorFilesComposeIconBuiltinFile.php
+++ b/src/applications/files/builtin/PhabricatorFilesComposeIconBuiltinFile.php
@@ -98,6 +98,14 @@
}
private function composeImage($color, $icon) {
+ // If we don't have the GD extension installed, just return a static
+ // default project image rather than trying to compose one.
+ if (!function_exists('imagecreatefromstring')) {
+ $root = dirname(phutil_get_library_root('phabricator'));
+ $default_path = $root.'/resources/builtin/profile.png';
+ return Filesystem::readFile($default_path);
+ }
+
$color_map = self::getAllColors();
$color = idx($color_map, $color);
if (!$color) {

File Metadata

Mime Type
text/plain
Expires
Fri, Jan 24, 21:31 (6 d, 23 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1133014
Default Alt Text
D25515.1737754311.diff (879 B)

Event Timeline