From d53346d7246df09ef0f3f33014205e308f9b1e3d Mon Sep 17 00:00:00 2001 From: Per Qvarforth Date: Tue, 8 Aug 2023 09:12:19 +0000 Subject: [PATCH] php8 related changes --- htdocs/includes/autoload.php | 3 ++- htdocs/includes/bootstrap.php | 4 ++-- htdocs/public/heatmaps/gd-heatmap/gd-rg.php | 14 +++++++++++--- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/htdocs/includes/autoload.php b/htdocs/includes/autoload.php index 80ca220..7c9ffa6 100644 --- a/htdocs/includes/autoload.php +++ b/htdocs/includes/autoload.php @@ -6,7 +6,7 @@ * @param string $className * @return null */ -function __autoload($className) +function __autoload_trackdirect($className) { if (file_exists(ROOT . '/includes/' . strtolower($className) . '.class.php')) { @@ -22,3 +22,4 @@ function __autoload($className) error_log(sprintf('Could not find class %s', $className)); } } +spl_autoload_register('__autoload_trackdirect'); diff --git a/htdocs/includes/bootstrap.php b/htdocs/includes/bootstrap.php index 35e805c..5509ffa 100644 --- a/htdocs/includes/bootstrap.php +++ b/htdocs/includes/bootstrap.php @@ -8,7 +8,7 @@ if (!defined('ROOT')) { date_default_timezone_set("UTC"); ini_set("error_reporting", "true"); - error_reporting(E_ALL|E_STRCT); + error_reporting(E_ALL|E_STRICT); ini_set("display_errors", "false"); -} \ No newline at end of file +} diff --git a/htdocs/public/heatmaps/gd-heatmap/gd-rg.php b/htdocs/public/heatmaps/gd-heatmap/gd-rg.php index 74066a4..34f7653 100644 --- a/htdocs/public/heatmaps/gd-heatmap/gd-rg.php +++ b/htdocs/public/heatmaps/gd-heatmap/gd-rg.php @@ -11,9 +11,17 @@ * */ class gd_gradient_alpha { + public $image; + public $width; + public $height; + public $direction; + public $alphastart; + public $alphaend; + public $step; + public $color; // Constructor. Creates, fills and returns an image - function gd_gradient_alpha($w,$h,$d,$rgb,$as,$ae,$step=0) { + function __construct($w,$h,$d,$rgb,$as,$ae,$step=0) { $this->width = $w; $this->height = $h; $this->direction = $d; @@ -43,9 +51,9 @@ class gd_gradient_alpha { // Return it //return $this->image; } - + function get_image() { - return $this->image; + return $this->image; }