preferred language and date filter fixes
[Evergreen.git] / Open-ILS / src / perlmods / OpenILS / Application / Storage / Publisher / metabib.pm
index c490b7b..9be3c6a 100644 (file)
@@ -2384,8 +2384,9 @@ sub staged_fts {
        my (@between,@statuses,@locations,@types,@forms,@lang,@aud,@lit_form,@vformats,@bib_level);
 
     if (!defined($args{preferred_language})) {
+               my $ses_locale = $client->session ? $client->session->session_locale : $default_preferred_language;
         $args{preferred_language} =
-            $locale_map{ $client->session->session_locale || $default_preferred_language } || 'eng';
+            $locale_map{ $ses_locale } || 'eng';
     }
 
     if (!defined($args{preferred_language_weight})) {