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

Prevent notice for missing configuration in PhabricatorIRCDifferentialNotificationHandler

Summary: Provide array() default so we don't foreach() over null in the case of a missing config (from @dctrwatson).

Test Plan: Will verify with @dctrwatson.

Reviewers: vrana, btrahan, dctrwatson

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D3686
This commit is contained in:
epriestley 2012-10-11 15:00:25 -07:00
parent 16703fbf04
commit 8798d2189e

View file

@ -57,7 +57,8 @@ final class PhabricatorIRCDifferentialNotificationHandler
$actor_name = $handles[$actor_phid]->getName();
$message = "{$actor_name} {$verb} revision D".$data['revision_id'].".";
foreach ($this->getConfig('notification.channels') as $channel) {
$channels = $this->getConfig('notification.channels', array());
foreach ($channels as $channel) {
$this->write('PRIVMSG', "{$channel} :{$message}");
}
}