From: Henri-Damien LAURENT Date: Fri, 20 Feb 2009 08:19:10 +0000 (+0100) Subject: Adding some Error Proof on C4::output X-Git-Tag: n_acq_a_porter~17 X-Git-Url: http://git.rot13.org/?p=koha.git;a=commitdiff_plain;h=2c2215d9c8a6e36b97d582acf62d42a6e668e58c Adding some Error Proof on C4::output $query was meant to be always defined. In case we use Output in a non CGI it is not the case. --- diff --git a/C4/Output.pm b/C4/Output.pm index 5bebf6c0c6..15d5fa4322 100644 --- a/C4/Output.pm +++ b/C4/Output.pm @@ -141,7 +141,7 @@ sub themelanguage { getTranslatedLanguages($interface,'prog') ) if $http_accept_language; # But, if there's a cookie set, obey it - $lang = $query->cookie('KohaOpacLanguage') if $query->cookie('KohaOpacLanguage'); + $lang = $query->cookie('KohaOpacLanguage') if (defined $query && $query->cookie('KohaOpacLanguage')); # Fall back to English my @languages; if ($interface eq 'intranet') {