Bug 19212: Preventing warns when asking for discharge
authorAleisha Amohia <aleishaamohia@hotmail.com>
Wed, 30 Aug 2017 23:35:57 +0000 (23:35 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 27 Oct 2017 19:05:55 +0000 (16:05 -0300)
To test:
1) Ensure the useDischarge syspref is enabled
2) Log in to OPAC
3) Go to 'ask for a discharge'
4) Notice warns
5) Apply patch and refresh page
6) Notice warns are gone

Sponsored-by: Catalyst IT

Warnings reproduced in plack-error.log, with patch they are gone.
Signed-off-by: Marc VĂ©ron <veron@veron.ch>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

opac/opac-discharge.pl

index c5f4745..7653dc6 100755 (executable)
@@ -37,7 +37,7 @@ unless ( C4::Context->preference('useDischarge') ) {
     exit;
 }
 
-my $op = $input->param("op");
+my $op = $input->param("op") || '';
 
 # Getting the template and auth
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user({