update cms

This commit is contained in:
JaguarJack
2021-05-27 08:55:09 +08:00
parent af8e6c3f5d
commit 9873a2156b
5 changed files with 292 additions and 5 deletions

View File

@@ -43,7 +43,11 @@ trait BannersEvent
$data = $model->getData();
if (isset($data['category_id'])) {
$model->category_id = $model->category_id[count($model->category_id) - 1];
$model->category_id = is_array($model->category_id) ?
(count($model->category_id) ? $model->category_id[count($model->category_id) - 1] : 0)
: $model->category_id;
}
}
}