From: Evan Prodromou Date: Thu, 7 Jan 2010 23:59:07 +0000 (-0800) Subject: clear profile location data if unparseable location string X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=6ae6fb7a35cb666fbb59218fa57717522af96f60;p=quix0rs-gnu-social.git clear profile location data if unparseable location string --- diff --git a/actions/profilesettings.php b/actions/profilesettings.php index ee236fe625..0d67778791 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;