From 6ae6fb7a35cb666fbb59218fa57717522af96f60 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Thu, 7 Jan 2010 15:59:07 -0800 Subject: clear profile location data if unparseable location string --- actions/profilesettings.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'actions') 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; -- cgit v1.2.3-54-g00ecf