shish 3 lat temu
rodzic
commit
5306f76b3f
1 zmienionych plików z 6 dodań i 0 usunięć
  1. 6 0
      biz-hd/custom/classes/CustomClass.php

+ 6 - 0
biz-hd/custom/classes/CustomClass.php

@@ -128,6 +128,12 @@ class CustomClass extends BaseClass
     //创建或获取客户信息 ssh 2021.3.19
     public static function buildRelation($shop, $user)
     {
+        if (empty($user)) {
+            return false;
+        }
+        if (empty($shop)) {
+            return false;
+        }
         $userId = $user->id;
         $name = $user->name ?? '';
         $mobile = $user->mobile ?? '';