Browse Source

修复内容默认值

tbphp 1 year ago
parent
commit
ac1bf23dfe
1 changed files with 1 additions and 1 deletions
  1. 1 1
      application/admin/controller/Content.php

+ 1 - 1
application/admin/controller/Content.php

@@ -27,7 +27,7 @@ class Content extends Base
         $member = Member::where(['id' => ['in', $uids]])->column('name', 'id');
 
         foreach ($list as &$v) {
-            $v['cate']   = alias($v['type'], $v['arttype']) . '/' . $cate[$v['cate']] . '/' . $cate[$v['catesub']];
+            $v['cate']   = alias($v['type'], $v['arttype']) . '/' . ($cate[$v['cate']] ?? '-') . '/' . ($cate[$v['catesub']] ?? '-');
             $v['auther'] = $member[$v['uid']];
         }
     }