From a8af59bfb6f2fbe30bc8202d64cae37b468cb174 Mon Sep 17 00:00:00 2001 From: Aleisha Date: Tue, 21 Jul 2015 01:22:09 +0000 Subject: [PATCH] Bug 14580: Silencing warn triggered when accessing Help from an error page To test: 1) Go to an error page (ie cgi-bin/koha/errors/404.pl or just going to an invalid link will do it) 2) Click 'Help' 3) Notice warn 4) Apply patch and refresh page 5) Click 'Help' 6) Notice warn is gone and help still loads as it should --- help.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/help.pl b/help.pl index f36e9d2..c8544c2 100755 --- a/help.pl +++ b/help.pl @@ -49,6 +49,7 @@ my $htdocs = C4::Context->config('intrahtdocs'); # checking that the help file exist, otherwise, display nohelp.tt page # my ( $theme, $lang ) = C4::Templates::themelanguage( $htdocs, $from, "intranet", $query ); +$lang //= ''; unless ( -e "$htdocs/$theme/$lang/modules/$from" ) { $from = "help/nohelp.tt"; ( $theme, $lang ) = C4::Templates::themelanguage( $htdocs, $from, "intranet", $query ); -- 1.7.10.4