summaryrefslogtreecommitdiff
path: root/FS/FS/Msgcat.pm
diff options
context:
space:
mode:
Diffstat (limited to 'FS/FS/Msgcat.pm')
-rw-r--r--FS/FS/Msgcat.pm3
1 files changed, 3 insertions, 0 deletions
diff --git a/FS/FS/Msgcat.pm b/FS/FS/Msgcat.pm
index 242980515..2406e8db0 100644
--- a/FS/FS/Msgcat.pm
+++ b/FS/FS/Msgcat.pm
@@ -58,6 +58,8 @@ our %cache;
sub _gettext {
my $msgcode = shift;
+ return '' unless defined($msgcode) && length($msgcode) > 0;
+
my $locale = (@_ && shift)
|| $FS::CurrentUser::CurrentUser->option('locale')
|| $def_locale;
@@ -85,6 +87,7 @@ sub _gettext {
});
warn "WARNING: auto-inserting message for msgcode $msgcode in locale $locale";
$newmsgcat->insert;
+ return $msgcode; # or maybe this should be below the next bracket?
}
}