From 453c896bd5089b7d9695f824a3b74472a1744fd9 Mon Sep 17 00:00:00 2001 From: make Date: Tue, 13 May 2025 18:47:40 +0800 Subject: [PATCH] debug --- code/app/services/VideoService.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/app/services/VideoService.php b/code/app/services/VideoService.php index 1496ecb..c600441 100644 --- a/code/app/services/VideoService.php +++ b/code/app/services/VideoService.php @@ -683,10 +683,10 @@ class VideoService $arrVideo = $this->VideoModel->getVideoByVId($intVId); // 取前5个元素 - $strTopActor = array_slice($arrVideo['v_actor'], 0, 5); + $strTopActor = (is_array($arrVideo['v_actor'] ?? null)) ? array_slice($arrVideo['v_actor'], 0, 5) : ''; // 取前5个元素 - $strTopDirectors = array_slice($arrVideo['v_director'], 0, 5); + $strTopDirectors = (is_array($arrVideo['v_director'] ?? null)) ? array_slice($arrVideo['v_director'], 0, 5) : ''; // 点击数 $arrVideoClicks = $this->VideoClicksModel->getStats($intVId);