Fix HTML exporter breaking with null values

This commit is contained in:
Skylar Ittner 2017-10-11 12:59:03 -06:00
parent 012ae2d767
commit 77700a50a2

View File

@ -208,6 +208,14 @@ function dataToODS($data, $name = "report") {
}
function dataToHTML($data, $name = "report") {
// HTML exporter doesn't like null values
for ($i = 0; $i < count($data); $i++) {
for ($j = 0; $j < count($data[$i]); $j++) {
if (is_null($data[$i][$j])) {
$data[$i][$j] = '';
}
}
}
header('Content-type: text/html');
$converter = new HTMLConverter();
$out = "<!DOCTYPE html>\n"