1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-25 16:22:43 +01:00

Fix fatal in Conpherence NUX state

Summary: Fixes T12619.

Test Plan: Faked `return array()` in ConpherneceThreadQuery, got a NUX instead of fatal.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12619

Differential Revision: https://secure.phabricator.com/D17764
This commit is contained in:
epriestley 2017-04-21 14:46:51 -07:00
parent 5c1e4488de
commit 03d0e3fdbc

View file

@ -89,13 +89,14 @@ final class ConpherenceListController extends ConpherenceController {
default:
$data = $this->loadDefaultParticipation($limit);
$all_participation = $data['all_participation'];
$conpherence_id = head($all_participation)->getConpherencePHID();
$conpherence = id(new ConpherenceThreadQuery())
->setViewer($user)
->withPHIDs(array($conpherence_id))
->needProfileImage(true)
->executeOne();
if ($all_participation) {
$conpherence_id = head($all_participation)->getConpherencePHID();
$conpherence = id(new ConpherenceThreadQuery())
->setViewer($user)
->withPHIDs(array($conpherence_id))
->needProfileImage(true)
->executeOne();
}
// If $conpherence is null, NUX state will render
break;
}