From 0c3fde5cd3c9e55cb168bd71374a2cfbedc74633 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Wed, 27 Jan 2010 09:30:22 -0500 Subject: [PATCH] handle error if no active currency is defined Signed-off-by: Galen Charlton --- admin/preferences.pl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/admin/preferences.pl b/admin/preferences.pl index 5c59e5d528..01fd72ec42 100755 --- a/admin/preferences.pl +++ b/admin/preferences.pl @@ -43,8 +43,13 @@ sub GetTab { my $tab_template = C4::Output::gettemplate( 'admin/preferences/' . $tab . '.pref', 'intranet', $input ); + my $active_currency = GetCurrency(); + my $local_currency; + if ($currency) { + $local_currency = $active_currency->{currency}; + } $tab_template->param( - local_currency => GetCurrency()->{'currency'}, # currency code is used, because we do not know how a given currency is formatted. + local_currency => $local_currency, # currency code is used, because we do not know how a given currency is formatted. ); return YAML::Syck::Load( $tab_template->output() ); -- 2.39.5