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

Fix a bug where Phortune could fatal while building crumbs

Summary: Ref T12451. `$this->getAccount()` may not return an account.

Test Plan:
- Visit `/phortune/X/`, where `X` is the ID of an account you don't have permission to view.
- Before patch: fatal.
- After patch: normal policy exception page.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12451

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

+6 -5
+6 -5
src/applications/phortune/controller/account/PhortuneAccountProfileController.php
··· 32 32 } 33 33 34 34 protected function buildApplicationCrumbs() { 35 + $crumbs = parent::buildApplicationCrumbs(); 36 + $crumbs->setBorder(true); 37 + 35 38 $account = $this->getAccount(); 36 - $id = $account->getID(); 37 - $account_uri = $this->getApplicationURI("/{$id}/"); 39 + if ($account) { 40 + $crumbs->addTextCrumb($account->getName(), $account->getURI()); 41 + } 38 42 39 - $crumbs = parent::buildApplicationCrumbs(); 40 - $crumbs->addTextCrumb($account->getName(), $account_uri); 41 - $crumbs->setBorder(true); 42 43 return $crumbs; 43 44 } 44 45