X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FMsgcat.pm;h=ce0fa78af702e9272781fe36490312780a11c0ae;hb=573139dbd6c37808697bfa72a3a468bb0980d4dd;hp=2429805158fd4f432e33591d89ded6fc264c84dd;hpb=db303b2cb273b45e03467f36e076b7c1db3bc4a4;p=freeside.git diff --git a/FS/FS/Msgcat.pm b/FS/FS/Msgcat.pm index 242980515..ce0fa78af 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; @@ -86,6 +88,7 @@ sub _gettext { warn "WARNING: auto-inserting message for msgcode $msgcode in locale $locale"; $newmsgcat->insert; } + return $msgcode; } }