mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-29 10:12:41 +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:
parent
5c1e4488de
commit
03d0e3fdbc
1 changed files with 8 additions and 7 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue