From d044c16201c3e98ab63bc6c0bdaaeb3a31b5d0fe Mon Sep 17 00:00:00 2001 From: Jim Brandt Date: Thu, 21 Jun 2018 16:03:56 -0400 Subject: [PATCH] Skip PO utility module when loading language files When initializing, RT::I18N loads any language files from the RT/I18N directory. 495bf0f8 added a new utility module to the same directory. Explicitly avoid auto-requiring it when initializing since it is used for testing. Fixes: I#33823 --- lib/RT/I18N.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/RT/I18N.pm b/lib/RT/I18N.pm index a4ee9c840e4..f2650a3d644 100644 --- a/lib/RT/I18N.pm +++ b/lib/RT/I18N.pm @@ -103,6 +103,7 @@ sub Init { # Load language-specific functions foreach my $file ( File::Glob::bsd_glob(substr(Cwd::abs_path(__FILE__), 0, -3) . "/*.pm") ) { my ($lang) = ($file =~ /([^\\\/]+?)\.pm$/); + next if $lang eq 'Extract'; # Avoid loading non-language utility module next unless grep $_ eq '*' || $_ eq $lang, @lang; require $file; }