summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-01-07 15:59:07 -0800
committerEvan Prodromou <evan@status.net>2010-01-07 15:59:07 -0800
commit6ae6fb7a35cb666fbb59218fa57717522af96f60 (patch)
tree82b118ce7831e87f3228b32069921cb3ce3166de
parentc0a062dd8517a95acf8a7bdddddd4a397d791c1f (diff)
clear profile location data if unparseable location string
-rw-r--r--actions/profilesettings.php7
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;