From f9a1b6b4f476cbec7eae8248ed9e0a256baa57da Mon Sep 17 00:00:00 2001
From: Isaac Connor <isaac@zoneminder.com>
Date: Thu, 22 Feb 2024 12:55:35 -0500
Subject: [PATCH] Only show cpuUsage if we have an Id

---
 web/skins/classic/includes/functions.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/web/skins/classic/includes/functions.php b/web/skins/classic/includes/functions.php
index 1e393399b..68488bfb9 100644
--- a/web/skins/classic/includes/functions.php
+++ b/web/skins/classic/includes/functions.php
@@ -390,7 +390,7 @@ function getCpuUsageHTML() {
   $result = '';
   if ( !canView('System') ) return $result;
   global $thisServer;
-  if ($thisServer) {
+  if ($thisServer and $thisServer->Id()) {
     $result .= '<li id="getCpuUsagesHTML" class="CpuUsage nav-item mx-2">'.PHP_EOL;
     $result .= '&nbsp;'.translate('Cpu').': '.number_format($thisServer->CpuUsagePercent(), 1, '.', '').'%'.PHP_EOL;
     $result .= '</li>'.PHP_EOL;