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:
+2
-1
@@ -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}");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user