Bugzilla – Attachment 136557 Details for
Bug 31000
Use of uninitialized value $record_type in string eq
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31000: HOTFIX. Warn removal: param record_type can be undef
Bug-31000-HOTFIX-Warn-removal-param-recordtype-can.patch (text/plain), 1.63 KB, created by
David Nind
on 2022-06-26 18:10:37 UTC
(
hide
)
Description:
Bug 31000: HOTFIX. Warn removal: param record_type can be undef
Filename:
MIME Type:
Creator:
David Nind
Created:
2022-06-26 18:10:37 UTC
Size:
1.63 KB
patch
obsolete
>From 7fa37b97c808f28aa3d9095f8ea802c8b7f122c0 Mon Sep 17 00:00:00 2001 >From: Andrew Nugged <nugged@gmail.com> >Date: Fri, 26 Nov 2021 13:45:37 +0200 >Subject: [PATCH] Bug 31000: HOTFIX. Warn removal: param record_type can be > undef > >Uninitialized value warning on /tools/export.pl when $record_type is undef > >Use of uninitialized value $record_type in string eq >at /home/vagrant/kohaclone/tools/export.pl line 43. > >This patch fixes it by working when $record_type is Undef. >The functionality still remains the same but warning doesn't flood >error log. >To reproduce: >1. Go to export data tool page (/tools/export.pl). >2. Check the error log and find the upper mentioned warning, >check the timestamp to ensure that it was added when you loaded the page. >3. Apply the patch. >4. Load the page again, ensure that the same warning doesn't get added >to the log file again. > >Signed-off-by: David Nind <david@davidnind.com> >--- > tools/export.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/tools/export.pl b/tools/export.pl >index 4fe6ce5cc5..b738afc60b 100755 >--- a/tools/export.pl >+++ b/tools/export.pl >@@ -40,7 +40,7 @@ my $op = $query->param("op") || ''; > my $output_format = $query->param("format") || $query->param("output_format") || 'iso2709'; > my $backupdir = C4::Context->config('backupdir'); > my $filename; >-if ( $record_type eq 'auths' ) { >+if ( $record_type && $record_type eq 'auths' ) { > $filename = $query->param("filename_auth") || ( $output_format eq 'xml' ? 'koha.xml' : 'koha.mrc' ); > } else { > $filename = $query->param("filename") || ( $output_format eq 'csv' ? 'koha.csv' : 'koha.mrc' ); >-- >2.30.2
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 31000
:
136388
|
136389
|
136557
|
136568
|
137459