Fix HTML exporter breaking with null values
This commit is contained in:
parent
012ae2d767
commit
77700a50a2
@ -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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user