shish 3 years ago
parent
commit
3482f134fb
1 changed files with 3 additions and 0 deletions
  1. 3 0
      app-hd/controllers/AddressController.php

+ 3 - 0
app-hd/controllers/AddressController.php

@@ -74,6 +74,9 @@ class AddressController extends BaseController
         $id = $post['id'] ?? 0;
         unset($post['id']);
         $address = AddressClass::getById($id, true);
+        if (empty($address)) {
+            util::fail('没有找到地址');
+        }
         if ($address->mainId != $this->mainId) {
             util::fail('没有权限修改');
         }