1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-02 02:40:58 +01:00

Fix a exception being thrown from Diviner

Summary: If no Diviner groups are defined that this line currently throws a fatal exception... make this a little more safe.

Test Plan: Applied to our install, no more exceptions.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D10999
This commit is contained in:
Joshua Spence 2014-12-17 14:34:55 +11:00
parent f18ee5c237
commit ed4c7893e9

View file

@ -57,7 +57,7 @@ final class DivinerLiveBook extends DivinerDAO
} }
public function getGroupName($group) { public function getGroupName($group) {
$groups = $this->getConfig('groups'); $groups = $this->getConfig('groups', array());
$spec = idx($groups, $group, array()); $spec = idx($groups, $group, array());
return idx($spec, 'name', $group); return idx($spec, 'name', $group);
} }