From 1b8db2726adcb2efe3a479ad8cac5e426e020886 Mon Sep 17 00:00:00 2001 From: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com> Date: Sat, 5 Apr 2025 12:35:12 +0200 Subject: [PATCH] refactor(Server): use data_get for safer access to settings properties in isFunctional method --- app/Models/Server.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Models/Server.php b/app/Models/Server.php index 56aa58e87..60d0da3ed 100644 --- a/app/Models/Server.php +++ b/app/Models/Server.php @@ -925,7 +925,7 @@ $schema://$host { public function isFunctional() { - $isFunctional = $this->settings->is_reachable && $this->settings->is_usable && $this->settings->force_disabled === false && $this->ip !== '1.2.3.4'; + $isFunctional = data_get($this->settings, 'is_reachable') && data_get($this->settings, 'is_usable') && data_get($this->settings, 'force_disabled') === false && $this->ip !== '1.2.3.4'; if ($isFunctional === false) { Storage::disk('ssh-mux')->delete($this->muxFilename());