Bugzilla – Attachment 105357 Details for
Bug 25605
Exporting report as a tab delimited file can produce a lot of warnings
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25605: Replace NULL values with '' when downloading a report as a tab separated text
Bug-25605-Replace-NULL-values-with--when-downloadi.patch (text/plain), 1.38 KB, created by
Didier Gautheron
on 2020-05-26 11:45:11 UTC
(
hide
)
Description:
Bug 25605: Replace NULL values with '' when downloading a report as a tab separated text
Filename:
MIME Type:
Creator:
Didier Gautheron
Created:
2020-05-26 11:45:11 UTC
Size:
1.38 KB
patch
obsolete
>From a6bf4b6dafe2b23a48ca076e40f45bdb5f65a853 Mon Sep 17 00:00:00 2001 >From: Didier Gautheron <didier.gautheron@biblibre.com> >Date: Tue, 26 May 2020 13:31:31 +0200 >Subject: [PATCH] Bug 25605: Replace NULL values with '' when downloading a > report as a tab separated text > >Test plan : > 1- Create a new report : select * from items; > 2- Run it > 3- Download the report as a tab separated text > 4- There's a lot of 'use of uninitialized value in join or string at ...koha/reports/guided_reports.pl line xxx.' > in plack-error.log > 5- Apply patch > 6- Restart all > 7- Redo 2 and 3 > 8- No more warning. > 9- diff both downloaded files, they must be the same. >--- > reports/guided_reports.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/reports/guided_reports.pl b/reports/guided_reports.pl >index fa2817f1c7..990832b14d 100755 >--- a/reports/guided_reports.pl >+++ b/reports/guided_reports.pl >@@ -901,7 +901,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') || ','; >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 25605
:
105357
|
108509
|
108561