From 5e51794878be474695aa79edf5103540c89cef1e Mon Sep 17 00:00:00 2001 From: Yannick Warnier Date: Mon, 6 Mar 2017 16:31:42 -0500 Subject: [PATCH 1/2] Add fixes for PHP 7.1 support - refs #1 --- src/Chart/Draw.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Chart/Draw.php b/src/Chart/Draw.php index 96af6a5..6f66ada 100644 --- a/src/Chart/Draw.php +++ b/src/Chart/Draw.php @@ -1134,7 +1134,7 @@ public function drawFilledCircle($X, $Y, $Radius, array $Format = array()) ); } - $this->Mask = ""; + $this->Mask = []; $Color = $this->allocateColor($this->Picture, $R, $G, $B, $Alpha); for ($i = 0; $i <= $Radius * 2; $i++) { $Slice = sqrt($Radius * $Radius - ($Radius - $i) * ($Radius - $i)); @@ -2457,7 +2457,7 @@ public function drawLegend($X, $Y, array $Format = array()) $Y = $Y + max($this->FontSize * count($Lines), $IconAreaHeight) + 5; } elseif ($Mode == LEGEND_HORIZONTAL) { $Lines = preg_split("/\n/", $Serie["Description"]); - $Width = ""; + $Width = []; foreach ($Lines as $Key => $Value) { $BoxArray = $this->drawText( $X + $IconAreaWidth + 4, From 66a1b085bbc932486f409d481e9424e20114ecd1 Mon Sep 17 00:00:00 2001 From: Yannick Warnier Date: Wed, 8 Mar 2017 08:58:53 -0500 Subject: [PATCH 2/2] Add default value to [] for array, for coding consistency --- src/Chart/Draw.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Chart/Draw.php b/src/Chart/Draw.php index 6f66ada..5db0490 100644 --- a/src/Chart/Draw.php +++ b/src/Chart/Draw.php @@ -1155,7 +1155,7 @@ public function drawFilledCircle($X, $Y, $Radius, array $Format = array()) array("R" => $R, "G" => $G, "B" => $B, "Alpha" => $Alpha, "Ticks" => $Ticks) ); } - $this->Mask = ""; + $this->Mask = []; if ($BorderR != -1) { $this->drawCircle(