Index: trunk/extensions/LandingCheck/SpecialLandingCheck.php |
— | — | @@ -23,7 +23,7 @@ |
24 | 24 | $language = $wgRequest->getVal( 'language', 'en' ); |
25 | 25 | |
26 | 26 | $country = $wgRequest->getVal( 'country' ); |
27 | | - if ( !$country ) { |
| 27 | + if ( !$country && function_exists( geoip_country_code_by_name ) ) { |
28 | 28 | $ip = wfGetIP(); |
29 | 29 | if ( IP::isValid( $ip ) ) { |
30 | 30 | $country = geoip_country_code_by_name( $ip ); |