Bug 14445: Silences warn in letter.pl

When changing Koha module to 'Circulation', there is a warn saying that $code is uninitialized. This patch sets $code to an empty string to silence the warn.

To test:
1) Go to Tools, the Notices & Slips
2) Click 'new notice' (This will trigger warns, but ignore these as they will be corrected in the next patch)
3) Change Koha module to 'Circulation'
4) Notice warn about uninitialized $code variable
5) Apply patch and reload page, change Koha module to 'Circulation'
6) Notice page still works and warns are gone

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
(cherry picked from commit fe3a49e611)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
This commit is contained in:
Aleisha 2015-06-24 01:15:32 +00:00 committed by Liz Rea
parent 1277854315
commit 2ec7d2864f
1 changed files with 1 additions and 1 deletions

View File

@ -224,7 +224,7 @@ sub add_form {
}
if ( $module eq 'circulation' && $code eq "CHECKIN" ) {
if ( $module eq 'circulation' and $code and $code eq "CHECKIN" ) {
push @{$field_selection}, add_fields('old_issues');
} else {
push @{$field_selection}, add_fields('issues');