@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Don't require the "gd" extension be installed in order to run unit tests

Summary:
Ref T10405. If `gd` is not installed, a number of unit tests currently fail because they generate synthetic users and try to composite profile pictures for them.

Instead, just fall back to a static default if `gd` is not available.

Test Plan: Faked this pathway, created a new user, saw a default profile picture.

Reviewers: amckinley, lpriestley, avivey

Reviewed By: avivey

Maniphest Tasks: T10405

Differential Revision: https://secure.phabricator.com/D18812

+8
+8
src/applications/files/builtin/PhabricatorFilesComposeAvatarBuiltinFile.php
··· 58 58 } 59 59 60 60 private function composeImage($color, $image, $border) { 61 + // If we don't have the GD extension installed, just return a static 62 + // default profile image rather than trying to compose a dynamic one. 63 + if (!function_exists('imagecreatefromstring')) { 64 + $root = dirname(phutil_get_library_root('phabricator')); 65 + $default_path = $root.'/resources/builtin/profile.png'; 66 + return Filesystem::readFile($default_path); 67 + } 68 + 61 69 $color_const = hexdec(trim($color, '#')); 62 70 $true_border = self::rgba2gd($border); 63 71 $image_map = self::getImageMap();