Summary:
PHP warning when using more than one field
Detailed Description:
A php warning is generated when using more than 1 field and 1 or more fields are
empty.
when using:
{$fields=$one->get_field_hash()}
[07-May-2019 14:01:23 UTC] PHP Notice: Undefined offset: 2 in
/home/dev/public_html/coomber-dev/modules/CGFeedback/lib/class.comment.php on
line 113
fixed in CGFeedback/lib/class.comment.php in line 111, by replacing:
foreach( $fielddefs as $fid => $rec ) {
$name = $rec['name'];
$out[$name] = $this->_fields[$fid];
}
with:
foreach( $fielddefs as $fid => $rec ) {
$name = $rec['name'];
if ( isset($this->_fields[$fid]) ) {
$out[$name] = $this->_fields[$fid];
}
}