]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
clear profile location data if unparseable location string
authorEvan Prodromou <evan@status.net>
Thu, 7 Jan 2010 23:59:07 +0000 (15:59 -0800)
committerEvan Prodromou <evan@status.net>
Thu, 7 Jan 2010 23:59:07 +0000 (15:59 -0800)
actions/profilesettings.php

index ee236fe62503ec3b3cd7adf5af58e813a3605713..0d6777879193af2e9d66e662a3737ebd396fc062 100644 (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;