Skip to content

Commit d7a3b26

Browse files
committed
Deal with lingua not being able to work out the country
1 parent 0d0dc62 commit d7a3b26

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

cgi-bin/page.fcgi

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -774,12 +774,14 @@ sub vwflog
774774
}
775775
$warnings ||= '';
776776

777+
my $country = $lingua->country() || 'unknown';
778+
777779
if(open(my $fout, '>>', $vwflog)) {
778780
print $fout
779781
'"', $info->domain_name(), '",',
780782
'"', strftime('%F %T', localtime), '",',
781783
'"', ($ENV{REMOTE_ADDR} ? $ENV{REMOTE_ADDR} : ''), '",',
782-
'"', $lingua->country(), '",',
784+
'"', $country, '",',
783785
'"', $info->browser_type(), '",',
784786
'"', $lingua->language(), '",',
785787
$info->status(), ',',
@@ -805,7 +807,7 @@ sub vwflog
805807
Sys::Syslog::syslog('info|local0', '%s %s %s %s %s %d %s %s %d %s %s',
806808
$info->domain_name() || '',
807809
$ENV{REMOTE_ADDR} || '',
808-
$lingua->country() || '',
810+
$country,
809811
$info->browser_type() || '',
810812
$lingua->language() || '',
811813
$info->status() || '',

0 commit comments

Comments
 (0)