I received the following errors.
Notice: Undefined offset: 0 in C:\wamp\www\order\KoolPHP\KoolControls\KoolGrid\ext\datasources\AdvancedArrayDataSource.php on line 108
Warning: Invalid argument supplied for foreach() in C:\wamp\www\order\KoolPHP\KoolControls\KoolGrid\ext\datasources\AdvancedArrayDataSource.php on line 108
function GetFields()
{
$_fields = array();
foreach($this->_Data[0] as $_key=>$_value)
{
$_field = array("Name"=>$_key,"Type"=>gettype($_value),"Not_Null"=>false);
array_push($_fields,$_field);
}
return $_fields;
}
I did the following to apply the remedy to the problem. If you guys could do a permanent fix, I would greatly appreciate it so that I do not have to fix it each time I upgrade.
function GetFields()
{
$_fields = array();
if(isset( $this->_Data[0] ) )
{
foreach($this->_Data[0] as $_key=>$_value)
{
$_field = array("Name"=>$_key,"Type"=>gettype($_value),"Not_Null"=>false);
array_push($_fields,$_field);
}
return $_fields;
}
}