Bug 25605: Replace NULL values with '' when downloading a report as a tab separated...
[koha.git] / reports / guided_reports.pl
index f52a6df..4512ef5 100755 (executable)
@@ -902,7 +902,7 @@ elsif ($phase eq 'Export'){
             $content .= join("\t", header_cell_values($sth)) . "\n";
             $content = Encode::decode('UTF-8', $content);
             while (my $row = $sth->fetchrow_arrayref()) {
-                $content .= join("\t", @$row) . "\n";
+                $content .= join("\t", map { $_ // '' } @$row) . "\n";
             }
         } else {
             my $delimiter = C4::Context->preference('delimiter') || ',';