Differential D21457 Diff 51063 src/applications/notification/config/PhabricatorNotificationServersConfigType.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/notification/config/PhabricatorNotificationServersConfigType.php
Show First 20 Lines • Show All 92 Lines • ▼ Show 20 Lines | foreach ($value as $index => $spec) { | ||||
$path = idx($spec, 'path'); | $path = idx($spec, 'path'); | ||||
if ($type == 'admin' && strlen($path)) { | if ($type == 'admin' && strlen($path)) { | ||||
throw $this->newException( | throw $this->newException( | ||||
pht( | pht( | ||||
'Notification server configuration describes an invalid host '. | 'Notification server configuration describes an invalid host '. | ||||
'("%s", at index "%s"). This is an "admin" service but it has a '. | '("%s", at index "%s"). This is an "admin" service but it has a '. | ||||
'"path" property. This property is only valid for "client" '. | '"path" property. This property is only valid for "client" '. | ||||
'services.')); | 'services.', | ||||
$host, | |||||
$index)); | |||||
} | } | ||||
// We can't guarantee that you didn't just give the same host two | // We can't guarantee that you didn't just give the same host two | ||||
// different names in DNS, but this check can catch silly copy/paste | // different names in DNS, but this check can catch silly copy/paste | ||||
// mistakes. | // mistakes. | ||||
$key = "{$host}:{$port}"; | $key = "{$host}:{$port}"; | ||||
if (isset($map[$key])) { | if (isset($map[$key])) { | ||||
throw $this->newException( | throw $this->newException( | ||||
Show All 29 Lines |