Fix that CSV exports contain empty strings instead of zeros

This commit is contained in:
Silas 2025-04-07 13:46:21 +02:00 committed by GitHub
parent 6c7f1e5466
commit ff04a2ea43
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -37,7 +37,7 @@ class Csv
}
$out = array();
foreach ($row as & $val) {
$out[] = '"' . ($val ? str_replace('"', '""', $val) : '') . '"';
$out[] = '"' . ($val == '0' ? '0' : ($val ? str_replace('"', '""', $val) : '')) . '"';
}
$csv .= implode(',', $out) . "\r\n";
}