dever il y a 3 ans
Parent
commit
99bfe6ba94
1 fichiers modifiés avec 15 ajouts et 10 suppressions
  1. 15 10
      app/shop/lib/Sell.php

+ 15 - 10
app/shop/lib/Sell.php

@@ -1021,21 +1021,26 @@ class Sell
         if ($info['address_id'] > 0) {
             $address = Dever::load('passport/address')->getOne($info['uid'], $info['address_id']);
 
-            $result['收货地址'] = array
-            (
-                'head' => array('省份', '城市', '地区','地址', '门牌号', '姓名', '手机号'),
-                'body' => array($address['province_name'], $address['city_name'], $address['county_name'], $address['address'], $address['house_number'], $address['contact'], $address['mobile'])
-            );
+            if ($address) {
+                $result['收货地址'] = array
+                (
+                    'head' => array('省份', '城市', '地区','地址', '门牌号', '姓名', '手机号'),
+                    'body' => array($address['province_name'], $address['city_name'], $address['county_name'], $address['address'], $address['house_number'], $address['contact'], $address['mobile'])
+                );
+            }
+            
         }
 
         if ($info['invoice_id'] > 0) {
             $invoice = Dever::load('passport/invoice')->getOne($info['uid'], $info['invoice_id']);
 
-            $result['发票信息'] = array
-            (
-                'head' => array('发票类型', '抬头', '税号','手机号', '邮箱'),
-                'body' => array($invoice['title_type_name'], $invoice['title'], $invoice['number'], $invoice['mobile'], $invoice['email'])
-            );
+            if ($invoice) {
+                $result['发票信息'] = array
+                (
+                    'head' => array('发票类型', '抬头', '税号','手机号', '邮箱'),
+                    'body' => array($invoice['title_type_name'], $invoice['title'], $invoice['number'], $invoice['mobile'], $invoice['email'])
+                );
+            }
         }