mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-20 06:26:57 +00:00
try to fix psalm
Signed-off-by: Simon L <szaimen@e.mail.de>
This commit is contained in:
parent
c2bfe1d37d
commit
b4a380c1b2
2 changed files with 3 additions and 3 deletions
|
|
@ -8,7 +8,7 @@ if (strpos($domain, '.') === false) {
|
||||||
http_response_code(400);
|
http_response_code(400);
|
||||||
} elseif (strpos($domain, ':') !== false) {
|
} elseif (strpos($domain, ':') !== false) {
|
||||||
http_response_code(400);
|
http_response_code(400);
|
||||||
} elseif (!filter_var($domain, FILTER_VALIDATE_DOMAIN, FILTER_FLAG_HOSTNAME)) {
|
} elseif (!filter_var($domain, FILTER_VALIDATE_DOMAIN, FILTER_FLAG_HOSTNAME) === false) {
|
||||||
http_response_code(400);
|
http_response_code(400);
|
||||||
} elseif (filter_var($domain, FILTER_VALIDATE_IP)) {
|
} elseif (filter_var($domain, FILTER_VALIDATE_IP)) {
|
||||||
http_response_code(400);
|
http_response_code(400);
|
||||||
|
|
|
||||||
|
|
@ -286,7 +286,7 @@ class ConfigurationManager
|
||||||
}
|
}
|
||||||
|
|
||||||
// Validate domain
|
// Validate domain
|
||||||
if (!filter_var($domain, FILTER_VALIDATE_DOMAIN, FILTER_FLAG_HOSTNAME)) {
|
if (filter_var($domain, FILTER_VALIDATE_DOMAIN, FILTER_FLAG_HOSTNAME) === false) {
|
||||||
throw new InvalidSettingConfigurationException("Domain is not a valid domain!");
|
throw new InvalidSettingConfigurationException("Domain is not a valid domain!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -305,7 +305,7 @@ class ConfigurationManager
|
||||||
|
|
||||||
if (empty($dnsRecordIP)) {
|
if (empty($dnsRecordIP)) {
|
||||||
$record = dns_get_record($domain, DNS_AAAA);
|
$record = dns_get_record($domain, DNS_AAAA);
|
||||||
if (!empty($record)) {
|
if (!empty($record[0]['ipv6'])) {
|
||||||
$dnsRecordIP = $record[0]['ipv6'];
|
$dnsRecordIP = $record[0]['ipv6'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue