@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.

unbreak typeaheads for /owners/new

Summary:
D6057 introduced images in the typeahead results, but not all
projects return a valid result. This silently broke /owners/new because
the exception "Call to a member function loadProfileImageURI() on a non-object"
is swallowed somewhere in the handler.

Test Plan: go to /owners/new and type something in the primary owner field

Reviewers: epriestley, nh, Afaque_Hussain

Reviewed By: epriestley

CC: aran, Korvin

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

+6 -2
+6 -2
src/applications/typeahead/controller/PhabricatorTypeaheadCommonDatasourceController.php
··· 206 206 ->withStatus(PhabricatorProjectQuery::STATUS_OPEN) 207 207 ->execute(); 208 208 foreach ($projs as $proj) { 209 - $results[] = id(new PhabricatorTypeaheadResult()) 209 + $proj_result = id(new PhabricatorTypeaheadResult()) 210 210 ->setName($proj->getName()) 211 211 ->setDisplayType("Project") 212 212 ->setURI('/project/view/'.$proj->getID().'/') 213 - ->setImageURI($proj->loadProfile()->loadProfileImageURI()) 214 213 ->setPHID($proj->getPHID()); 214 + $prof = $proj->loadProfile(); 215 + if ($prof) { 216 + $proj_result->setImageURI($prof->loadProfileImageURI()); 217 + } 218 + $results[] = $proj_result; 215 219 } 216 220 } 217 221