From 64167befde25e107f8b6e496883d791dd18bd5f5 Mon Sep 17 00:00:00 2001 From: Lukas Winkler <Findus23@users.noreply.github.com> Date: Sun, 24 Sep 2017 21:09:38 +0200 Subject: [PATCH] Make old Sparkline Library support PHP 7.2 (#12099) * make old sparklines library work with PHP 7.2 * fix typo in old sparkline library --- libs/sparkline/lib/Sparkline.php | 6 +++--- libs/sparkline/lib/{Object.php => SparklineObject.php} | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) rename libs/sparkline/lib/{Object.php => SparklineObject.php} (99%) diff --git a/libs/sparkline/lib/Sparkline.php b/libs/sparkline/lib/Sparkline.php index 54ff01a7a0..3e817599bb 100644 --- a/libs/sparkline/lib/Sparkline.php +++ b/libs/sparkline/lib/Sparkline.php @@ -22,9 +22,9 @@ define('FONT_3', 3); define('FONT_4', 4); define('FONT_5', 5); -require_once dirname(__FILE__).'/Object.php'; +require_once dirname(__FILE__).'/SparklineObject.php'; -class Sparkline extends Object { +class Sparkline extends SparklineObject { var $imageX; var $imageY; @@ -405,7 +405,7 @@ class Sparkline extends Object { } function DrawImageCopyResampled($dhandle, $shandle, $dx, $dy, $sx, $sy, $dw, $dh, $sw, $sh) { - $this->Debug("Sparkline :: DrawImageCopyResampled($dhhandle, $shandle, $dx, $dy, $sx, $sy, $dw, $dh, $sw, $sh)", DEBUG_DRAW); + $this->Debug("Sparkline :: DrawImageCopyResampled($dhandle, $shandle, $dx, $dy, $sx, $sy, $dw, $dh, $sw, $sh)", DEBUG_DRAW); if (!$this->IsError()) { return imagecopyresampled($dhandle, // dest handle $shandle, // src handle diff --git a/libs/sparkline/lib/Object.php b/libs/sparkline/lib/SparklineObject.php similarity index 99% rename from libs/sparkline/lib/Object.php rename to libs/sparkline/lib/SparklineObject.php index 3a66156691..98a8f4358a 100644 --- a/libs/sparkline/lib/Object.php +++ b/libs/sparkline/lib/SparklineObject.php @@ -69,7 +69,7 @@ function log_write($string, $type = '', $date = false) { } } // function log_write -class Object { +class SparklineObject { var $isError; var $logFile; -- GitLab