Index: trunk/extensions/Maps/Geocoders/Maps_BaseGeocoder.php |
— | — | @@ -55,7 +55,9 @@ |
56 | 56 | |
57 | 57 | curl_setopt($ch, CURLOPT_URL, $requestURL); |
58 | 58 | curl_setopt($ch, CURLOPT_HEADER, 0); //Change this to a 1 to return headers |
59 | | - curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']); |
| 59 | + if (array_key_exists('HTTP_USER_AGENT', $_SERVER)) |
| 60 | + curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']); |
| 61 | + // TODO else curl_setopt($ch, CURLOPT_USERAGENT, "MediaWiki/Maps extension"); |
60 | 62 | curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); |
61 | 63 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); |
62 | 64 | |