Skip to content

Commit

Permalink
Merge pull request #174 from agrowe/pchart_php7
Browse files Browse the repository at this point in the history
Convert pChart to be PHP7 compatible
  • Loading branch information
jleyva authored Mar 9, 2021
2 parents aea3402 + dd89a78 commit f63cf94
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/pChart/pCache.class
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
var $CacheFolder = "Cache/";

/* Create the pCache object */
function pCache($CacheFolder="Cache/")
function __construct($CacheFolder="Cache/")
{
$this->CacheFolder = $CacheFolder;
}
Expand Down
6 changes: 3 additions & 3 deletions lib/pChart/pChart.class
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@
var $MapID = NULL;

/* This function create the background picture */
function pChart($XSize,$YSize)
function __construct($XSize,$YSize)
{
$this->XSize = $XSize;
$this->YSize = $YSize;
Expand Down Expand Up @@ -298,7 +298,7 @@
$buffer = fgets($handle, 4096);
$buffer = str_replace(chr(10),"",$buffer);
$buffer = str_replace(chr(13),"",$buffer);
$Values = split($Delimiter,$buffer);
$Values = explode($Delimiter,$buffer);
if ( count($Values) == 3 )
{
$this->Palette[$ColorID]["R"] = $Values[0];
Expand Down Expand Up @@ -3384,7 +3384,7 @@
{
/* Strip HTML query strings */
$Values = $this->tmpFolder.$MapName;
$Value = split("\?",$Values);
$Value = explode("?",$Values);
$FileName = $Value[0];

if ( file_exists($FileName) )
Expand Down
4 changes: 2 additions & 2 deletions lib/pChart/pData.class
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
var $Data;
var $DataDescription;

function pData()
function __construct()
{
$this->Data = [];
$this->DataDescription = [];
Expand All @@ -72,7 +72,7 @@
$buffer = fgets($handle, 4096);
$buffer = str_replace(chr(10),"",$buffer);
$buffer = str_replace(chr(13),"",$buffer);
$Values = split($Delimiter,$buffer);
$Values = explode($Delimiter,$buffer);

if ( $buffer != "" )
{
Expand Down

0 comments on commit f63cf94

Please sign in to comment.