mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-22 13:30:55 +01:00
Fixes T10805. When clustering is not configured, this check should just
return. Auditors: chad
This commit is contained in:
parent
91479e2832
commit
0379cc10ac
1 changed files with 5 additions and 0 deletions
5
src/infrastructure/env/PhabricatorEnv.php
vendored
5
src/infrastructure/env/PhabricatorEnv.php
vendored
|
@ -782,6 +782,11 @@ final class PhabricatorEnv extends Phobject {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function isClusterRemoteAddress() {
|
public static function isClusterRemoteAddress() {
|
||||||
|
$cluster_addresses = self::getEnvConfig('cluster.addresses');
|
||||||
|
if (!$cluster_addresses) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
$address = idx($_SERVER, 'REMOTE_ADDR');
|
$address = idx($_SERVER, 'REMOTE_ADDR');
|
||||||
if (!$address) {
|
if (!$address) {
|
||||||
throw new Exception(
|
throw new Exception(
|
||||||
|
|
Loading…
Reference in a new issue