mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-03 04:46:18 +00:00
Always prefer stricter string comparisons.
This commit is contained in:
1 parent
79d5434da2
commit
601f1a4717
25 files changed
+55
-55
No files matched your search
@@ -275,7 +275,7 @@ class StandaloneDragonfly extends BaseModel
|
||||
if (str($metrics)->contains('error')) {
|
||||
$error = json_decode($metrics, true);
|
||||
$error = data_get($error, 'error', 'Something is not okay, are you okay?');
|
||||
if ($error == 'Unauthorized') {
|
||||
if ($error === 'Unauthorized') {
|
||||
$error = 'Unauthorized, please check your metrics token or restart Sentinel to set a new token.';
|
||||
}
|
||||
throw new \Exception($error);
|
||||
@@ -297,7 +297,7 @@ class StandaloneDragonfly extends BaseModel
|
||||
if (str($metrics)->contains('error')) {
|
||||
$error = json_decode($metrics, true);
|
||||
$error = data_get($error, 'error', 'Something is not okay, are you okay?');
|
||||
if ($error == 'Unauthorized') {
|
||||
if ($error === 'Unauthorized') {
|
||||
$error = 'Unauthorized, please check your metrics token or restart Sentinel to set a new token.';
|
||||
}
|
||||
throw new \Exception($error);
|
||||
|
||||
Reference in new issue
Block a user