From 1d1a431727a77322c5b6213d76b334e7729e7d1d Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Thu, 15 May 2014 11:22:16 -0400 Subject: [PATCH] LP#1306675 TPAC maketext default handler Fall back to an unitialized maketext handler, which defaults to the template language, when OpenILS::WWW::EGWeb::I18N->get_handle fails to return a response. Note that why get_handle() returns undef is not yet known. Signed-off-by: Bill Erickson Signed-off-by: Ben Shum --- Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm index 8b72e537eb..0f9e93e859 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm @@ -90,7 +90,8 @@ sub set_text_handler { $r->log->debug("egweb: messages locale = $locale"); return sub { - my $lh = OpenILS::WWW::EGWeb::I18N->get_handle($locale); + my $lh = OpenILS::WWW::EGWeb::I18N->get_handle($locale) + || OpenILS::WWW::EGWeb::I18N->new; return $lh->maketext(@_); }; } -- 2.43.2