dever 6 years ago
parent
commit
4a85e5abc0
1 changed files with 12 additions and 3 deletions
  1. 12 3
      src/Applet.php

+ 12 - 3
src/Applet.php

@@ -268,10 +268,19 @@ class Applet extends Base
               	$update['set_avatar'] = $pic;
             }
             
-            $update['set_city'] = $city;
+            if ($city) {
+                $update['set_city'] = $city;
+            }
+            
             //$update['set_mobile'] = $mobile;
-            $update['set_province'] = $province;
-            $update['set_country'] = $country;
+            if ($province) {
+                $update['set_province'] = $province;
+            }
+            
+            if ($country) {
+                $update['set_country'] = $country;
+            }
+            
             $update['where_id'] = $uid;
 
             if ($country && $province && $city) {