diff options
author | Evan Prodromou <evan@status.net> | 2010-01-07 15:59:07 -0800 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2010-01-07 15:59:07 -0800 |
commit | 6ae6fb7a35cb666fbb59218fa57717522af96f60 (patch) | |
tree | 82b118ce7831e87f3228b32069921cb3ce3166de /actions | |
parent | c0a062dd8517a95acf8a7bdddddd4a397d791c1f (diff) |
clear profile location data if unparseable location string
Diffstat (limited to 'actions')
-rw-r--r-- | actions/profilesettings.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/actions/profilesettings.php b/actions/profilesettings.php index ee236fe62..0d6777879 100644 --- a/actions/profilesettings.php +++ b/actions/profilesettings.php @@ -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; |