songxingwei 3 年之前
父節點
當前提交
a71ce5c75a
共有 1 個文件被更改,包括 6 次插入1 次删除
  1. 6 1
      application/common/model/User.php

+ 6 - 1
application/common/model/User.php

@@ -1263,7 +1263,12 @@ class User Extends Model
 
             if ($touser['household']){
                 $household = explode('-',$touser['household']);
-                $touser['household_city'] = $household[1];
+                if (isset($household[1])){
+                    $touser['household_city'] = $household[1];
+                }else{
+                    $touser['household_city'] = '';
+                }
+
             }else{
                 $touser['household_city'] = '';
             }