Since of numerous versions, when we use 'setup' and save the 'config' file, all array generation miss the last comma as in :
$cfg['PDFPageSizes'] = array(
'A3',
'A4',
'A5',
'letter' <--- where is the comma ?
'legal');
The error is in 'ConfigGenerator.class.php' on line 144 where the line must be
$ret .= ($i > 0 ? ',' : '') . $crlf . ' ' . $retv[$i];
instead of
$ret .= ($i < $imax ? ($i > 0 ? ',' : '') : '') . $crlf . ' ' . $retv[$i];
This bug was fixed in repository and will be part of a future release; thanks for reporting.