diff --git a/application/api/controller/Aiarticle.php b/application/api/controller/Aiarticle.php index 6927d27..a1bd685 100644 --- a/application/api/controller/Aiarticle.php +++ b/application/api/controller/Aiarticle.php @@ -731,22 +731,22 @@ class Aiarticle extends Base continue; } //更新作者名字 - if(!empty($aUser['author_name'])){ + if(isset($aUser['author_name'])){ $aUpdate = ['localname' => $aUser['author_name']]; Db::name('user')->where('user_id',$value['user_id'])->limit(1)->update($aUpdate); } //更新作者简介和单位 $aUpdateReviewer = []; - if(!empty($aUser['technical'])){ + if(isset($aUser['technical'])){ $aUpdateReviewer['technical'] = $aUser['technical']; } - if(!empty($aUser['introduction'])){ + if(isset($aUser['introduction'])){ $aUpdateReviewer['introduction'] = $aUser['introduction']; } - if(!empty($aUser['company'])){ + if(isset($aUser['company'])){ $aUpdateReviewer['company'] = $aUser['company']; } - if(!empty($aUpdateReviewer)){ + if(isset($aUpdateReviewer)){ if(in_array($value['user_id'], $aUserReviewer)){//更新 Db::name('user_reviewer_info')->where('reviewer_id',$value['user_id'])->limit(1)->update($aUpdateReviewer);