diff --git a/src/Dashboards/Redis/RedisTrait.php b/src/Dashboards/Redis/RedisTrait.php index 35ee8f6..a23ceb3 100644 --- a/src/Dashboards/Redis/RedisTrait.php +++ b/src/Dashboards/Redis/RedisTrait.php @@ -42,7 +42,7 @@ private function panels(): string { $used_memory = (int) $info['memory']['used_memory']; $max_memory = (int) $info['memory']['maxmemory']; - $memory_usage = round(($used_memory / $max_memory) * 100, 2); + $memory_usage = $max_memory > 0 ? round(($used_memory / $max_memory) * 100, 2) : 0; $panels = [ [