1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
# If GeoIP does not return any country flag (IP not found) return the english
# language instead of writing Perl warnings to the webserver error log.
diff -Naur pnopaste-1.4.orig//lib/Language.pm pnopaste-1.4/lib/Language.pm
--- pnopaste-1.4.orig//lib/Language.pm 2010-05-23 20:50:14.000000000 +0200
+++ pnopaste-1.4/lib/Language.pm 2010-08-17 20:42:20.000000000 +0200
@@ -64,7 +64,10 @@
sub Mapping {
my($Lang) = @_;
- if($Lang eq 'AT'){
+ if(!defined $Lang){
+ $Lang = 'EN';
+ }
+ elsif($Lang eq 'AT'){
$Lang = 'DE';
}
|