Explorar el Código

wesmiler 报恩寺项目提交

wesmiler hace 4 años
padre
commit
6e54b0e188
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      app/Services/ArticleService.php

+ 1 - 1
app/Services/ArticleService.php

@@ -194,7 +194,7 @@ class ArticleService extends BaseService
         $data = request()->all();
 
         // 图片处理
-        $image = trim($data['thumb']);
+        $image = $data['thumb']? trim($data['thumb']) : '';
         $id = isset($data['id']) ? $data['id'] : 0;
         if (!$id && !$image) {
             return message('请上传文章图片', false);