From b68eb401030bdb0101b7f055fb12585a8ade875b Mon Sep 17 00:00:00 2001 From: Sukhwinder Dhillon Date: Tue, 15 Aug 2023 16:41:52 +0200 Subject: [PATCH] (Bar/Line)Graph: Fix `Variable '$ts' is probably undefined` --- library/Icinga/Chart/Graph/BarGraph.php | 1 + library/Icinga/Chart/Graph/LineGraph.php | 1 + 2 files changed, 2 insertions(+) diff --git a/library/Icinga/Chart/Graph/BarGraph.php b/library/Icinga/Chart/Graph/BarGraph.php index adef42894..33429f5a9 100644 --- a/library/Icinga/Chart/Graph/BarGraph.php +++ b/library/Icinga/Chart/Graph/BarGraph.php @@ -67,6 +67,7 @@ class BarGraph extends Styleable implements Drawable $this->dataSet = $dataSet; $this->tooltips = $tooltips; + $ts = []; foreach ($this->tooltips as $value) { $ts[] = $value; } diff --git a/library/Icinga/Chart/Graph/LineGraph.php b/library/Icinga/Chart/Graph/LineGraph.php index 6954c596f..05f3a310f 100644 --- a/library/Icinga/Chart/Graph/LineGraph.php +++ b/library/Icinga/Chart/Graph/LineGraph.php @@ -74,6 +74,7 @@ class LineGraph extends Styleable implements Drawable $this->graphs = $graphs; $this->tooltips = $tooltips; + $ts = []; foreach ($this->tooltips as $value) { $ts[] = $value; }