1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-19 16:58:48 +02:00

Fix an issue where blame could fatal for unrecognized authors

Summary: See PHI255. See <https://discourse.phabricator-community.org/t/error-generating-blame-data/766>.

Test Plan:
  - Viewed a file contributed to by users with no Phabricator user accounts, in Diffusion.
  - Enabled blame.
  - Before patch: blame failed, fatal in logs.
  - After patch: blame worked.

Reviewers: amckinley

Reviewed By: amckinley

Differential Revision: https://secure.phabricator.com/D18833
This commit is contained in:
epriestley 2017-12-18 06:26:38 -08:00
parent 8dccf05c4c
commit e411d75964

View file

@ -1804,10 +1804,17 @@ final class DiffusionBrowseController extends DiffusionController {
// revision. We just render a blank for alignment.
$style = null;
$href = null;
$sigil = null;
$meta = null;
} else {
$src = $handles[$phid]->getImageURI();
$style = 'background-image: url('.$src.');';
$href = $handles[$phid]->getURI();
$sigil = 'has-tooltip';
$meta = array(
'tip' => $handles[$phid]->getName(),
'align' => 'E',
);
}
$links[$phid] = javelin_tag(
@ -1816,11 +1823,8 @@ final class DiffusionBrowseController extends DiffusionController {
'class' => 'diffusion-author-link',
'style' => $style,
'href' => $href,
'sigil' => 'has-tooltip',
'meta' => array(
'tip' => $handles[$phid]->getName(),
'align' => 'E',
),
'sigil' => $sigil,
'meta' => $meta,
));
}