pChart 2.x forum
http://wiki.pchart.net/forum/

Issue with stripVOID in pData.class
http://wiki.pchart.net/forum/viewtopic.php?f=5&t=402
Page 1 of 1

Author:  lukasr [ Mon Apr 18, 2011 11:06 am ]
Post subject:  Issue with stripVOID in pData.class

On line 98 of pData.class.php the "stripVOID" function is defined:
Code:
function stripVOID($Values)
    { $Result = ""; foreach($Values as $Key => $Value) { if ( $Value != VOID ) { $Result[] = $Value; } } return($Result); }

I suggest to change it to the following, because I got warnings in line 92 and 93 of pData.class.php (in the function addPoints) while adding a (automatically generated) series which contains only VOIDs.
Code:
function stripVOID($Values)
    { $Result = array(); foreach($Values as $Key => $Value) { if ( $Value != VOID ) { $Result[] = $Value; } } return($Result); }

Author:  jean-damien [ Mon Apr 18, 2011 11:10 am ]
Post subject:  Re: Issue with stripVOID in pData.class

Indeed, this is a bug, I should first check if we provide an array or a single value. This will be added in the next minor.

Thank you!
JD.

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/