1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-22 05:20:56 +01:00

Fix a fatal in the feed handler, grotesquely

Summary: The feed handler in the IRC bot calls Conduit to render feed stories, which sometimes end up here with no user. "Fix" it. This patch is really bad but the underlying code is a mess too. Fixing this is properly is blocked on T2222/T2217. Until those land, stop fataling at least.

Test Plan: @dctrwatson confirmed this fixed things.

Reviewers: dctrwatson, btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D6497
This commit is contained in:
epriestley 2013-07-18 20:47:29 -07:00
parent d89b8ce2b2
commit 02e1dc7443

View file

@ -189,7 +189,13 @@ final class PHUIFeedStoryView extends AphrontView {
} }
if ($this->epoch) { if ($this->epoch) {
// TODO: This is really bad; when rendering through Conduit and via
// renderText() we don't have a user.
if ($this->user) {
$foot = phabricator_datetime($this->epoch, $this->user); $foot = phabricator_datetime($this->epoch, $this->user);
} else {
$foot = null;
}
} else { } else {
$foot = pht('No time specified.'); $foot = pht('No time specified.');
} }