From cfc9aca6a4f53a1f4754a116e302fabe7ec8cc3f Mon Sep 17 00:00:00 2001 From: Tony Murray Date: Thu, 24 Aug 2023 10:09:50 -0500 Subject: [PATCH] Revert "Added empty string check (#15235)" (#15249) This reverts commit cbe2ba55cefe58b5372452bca32b8ecfc9b3fe7e. --- app/Models/Device.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/Models/Device.php b/app/Models/Device.php index e640a57ef0..20479b5778 100644 --- a/app/Models/Device.php +++ b/app/Models/Device.php @@ -180,15 +180,12 @@ class Device extends BaseModel { $hostname_is_ip = IP::isValid($this->hostname); - $return_value = SimpleTemplate::parse($this->display ?: \LibreNMS\Config::get('device_display_default', '{{ $hostname }}'), [ + return SimpleTemplate::parse($this->display ?: \LibreNMS\Config::get('device_display_default', '{{ $hostname }}'), [ 'hostname' => $this->hostname, 'sysName' => $this->sysName ?: $this->hostname, 'sysName_fallback' => $hostname_is_ip ? $this->sysName : $this->hostname, 'ip' => $this->overwrite_ip ?: ($hostname_is_ip ? $this->hostname : $this->ip), ]); - - // in case the displayName is a string without any content, return hostname - return trim($return_value) ?: $this->hostname; } /**