clear profile location data if unparseable location string

This commit is contained in:
Evan Prodromou 2010-01-07 15:59:07 -08:00
parent c0a062dd85
commit 6ae6fb7a35
1 changed files with 6 additions and 1 deletions

View File

@ -316,7 +316,12 @@ class ProfilesettingsAction extends AccountSettingsAction
$loc = Location::fromName($location);
if (!empty($loc)) {
if (empty($loc)) {
$profile->lat = null;
$profile->lon = null;
$profile->location_id = null;
$profile->location_ns = null;
} else {
$profile->lat = $loc->lat;
$profile->lon = $loc->lon;
$profile->location_id = $loc->location_id;