# 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';
 	}
 
