diff --git a/lib/Controller/SettingsController.php b/lib/Controller/SettingsController.php index 589e2193..89fdfefc 100644 --- a/lib/Controller/SettingsController.php +++ b/lib/Controller/SettingsController.php @@ -87,7 +87,7 @@ public function isDiscoveryEndpointValid($url) { $body = $response->getBody(); // Check if the request was successful - if ($httpCode == 200 && !empty($body)) { + if ($httpCode === Http::STATUS_OK && !empty($body)) { $result['isReachable'] = true; $data = json_decode($body, true); @@ -104,7 +104,7 @@ public function isDiscoveryEndpointValid($url) { } } } catch (Exception $e) { - $this->logger->error('Error - discovery endpoint validation: ' . $e); + $this->logger->error('Discovery endpoint validation error', ['exception' => $e]); } return $result;