Menu

#67 pData::AddPoint Raise Warnings

open
nobody
None
5
2010-06-22
2010-06-22
Anonymous
No

pData::AddPoint raise E_WARNING at line 126 due to the fact the pData initialize the Data & DataDescription with string values :
// Construction
$this->Data = "";
$this->DataDescription = "";

Used as an array it raise an error we can trace :
>> ERROR TRACER STARTS : 2010/Jun/22 12:06:19 ----------------------------------------------------------------------------------------------------------------
Uninitialized string offset: 0 in /home/web/html/backoffice/library/pChart/pData.class.php at line 126
Uninitialized string offset: 1 in /home/web/html/backoffice/library/pChart/pData.class.php at line 126

To avoid the trace log pollution, I came up with the idea to cahnge the constructor as follow :
$this->Data = array();
$this->DataDescription = array();

Discussion


Log in to post a comment.

MongoDB Logo MongoDB