From 2c2215d9c8a6e36b97d582acf62d42a6e668e58c Mon Sep 17 00:00:00 2001 From: Henri-Damien LAURENT Date: Fri, 20 Feb 2009 09:19:10 +0100 Subject: [PATCH] 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. --- C4/Output.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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') { -- 2.20.1