Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15397399
D18812.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
938 B
Referenced Files
None
Subscribers
None
D18812.diff
View Options
diff --git a/src/applications/files/builtin/PhabricatorFilesComposeAvatarBuiltinFile.php b/src/applications/files/builtin/PhabricatorFilesComposeAvatarBuiltinFile.php
--- a/src/applications/files/builtin/PhabricatorFilesComposeAvatarBuiltinFile.php
+++ b/src/applications/files/builtin/PhabricatorFilesComposeAvatarBuiltinFile.php
@@ -58,6 +58,14 @@
}
private function composeImage($color, $image, $border) {
+ // If we don't have the GD extension installed, just return a static
+ // default profile image rather than trying to compose a dynamic 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_const = hexdec(trim($color, '#'));
$true_border = self::rgba2gd($border);
$image_map = self::getImageMap();
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Mar 17, 7:55 PM (3 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7328934
Default Alt Text
D18812.diff (938 B)
Attached To
Mode
D18812: Don't require the "gd" extension be installed in order to run unit tests
Attached
Detach File
Event Timeline
Log In to Comment