diff --git a/library/Icinga/File/Csv.php b/library/Icinga/File/Csv.php index 56ee233eeb..d189780403 100644 --- a/library/Icinga/File/Csv.php +++ b/library/Icinga/File/Csv.php @@ -37,7 +37,7 @@ public function __toString() } $out = array(); foreach ($row as & $val) { - $out[] = '"' . str_replace('"', '""', $val) . '"'; + $out[] = '"' . ($val ? str_replace('"', '""', $val) : '') . '"'; } $csv .= implode(',', $out) . "\r\n"; }