Skip to content

Commit

Permalink
php 8.2 compatibility patches
Browse files Browse the repository at this point in the history
  • Loading branch information
f1mishutka committed Aug 15, 2022
1 parent 9ae9fcb commit ac5c32c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
2 changes: 2 additions & 0 deletions src/lib/jpgraph.php
Original file line number Diff line number Diff line change
Expand Up @@ -4169,6 +4169,8 @@ class Ticks {
$ticks_pos = array(), $maj_ticks_label = array();
public $precision;

public $ticks_label = array(); /* mitoteam: absent in original sources */

protected $minor_abs_size=3, $major_abs_size=5;
protected $scale;
protected $is_set=false;
Expand Down
4 changes: 3 additions & 1 deletion src/lib/jpgraph_contour.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ class Contour {
private $invert = true;
private $highcontrast = false, $highcontrastbw = false;

private $edges = array();

/**
* Create a new contour level "algorithm machine".
* @param $aMatrix The values to find the contour from
Expand Down Expand Up @@ -387,7 +389,7 @@ function getIsobars() {
class ContourPlot extends Plot {

private $contour, $contourCoord, $contourVal, $contourColor;
private $nbrCountours = 0 ;
private $nbrContours = 0 ; /* mitoteam: was $nbrCountours in original sources */
private $dataMatrix = array();
private $invertLegend = false;
private $interpFactor = 1;
Expand Down
19 changes: 10 additions & 9 deletions src/lib/jpgraph_theme.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//=======================================================================
// File: JPGRAPH_THEME.INC.PHP
// Description: Class to define graph theme
// Created: 2010-09-29
// Created: 2010-09-29
// Ver: $Id: jpgraph_theme.inc.php 83 2010-10-01 11:24:19Z atsushi $
//
// Copyright (c) Asial Corporation. All rights reserved.
Expand All @@ -15,17 +15,18 @@
}

//===================================================
// CLASS
// Description:
// CLASS
// Description:
//===================================================
abstract class Theme {
protected $color_index;

protected $graph; /* mitoteam: absent in original sources */

function __construct() {
$this->color_index = 0;
}
/**
*
*
*/
abstract function GetColorList();

Expand All @@ -37,7 +38,7 @@ abstract function ApplyPlot($plot);

/**
*
*/
*/
function SetupPlot($plot) {
if (is_array($plot)) {
foreach ($plot as $obj) {
Expand Down Expand Up @@ -78,13 +79,13 @@ function PreStrokeApply($graph) {
/**
*
*/
function GetThemeColors($num = 30) {
function GetThemeColors($num = 30) {
$result_list = array();

$old_index = $this->color_index;
$this->color_index = 0;
$count = 0;

$i = 0;
while (true) {
for ($j = 0; $j < count($this->GetColorList()); $j++) {
Expand All @@ -97,7 +98,7 @@ function GetThemeColors($num = 30) {
}

$this->color_index = $old_index;

return $result_list;
}

Expand Down

0 comments on commit ac5c32c

Please sign in to comment.