From bf8775797e76d7a617cfd50c41bd7834ddc7ae4b Mon Sep 17 00:00:00 2001 From: yangduo Date: Tue, 1 Apr 2025 22:51:40 +0800 Subject: [PATCH] fix --- webapp/controller/PassController.class.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/webapp/controller/PassController.class.php b/webapp/controller/PassController.class.php index 2d63908..cc11a16 100644 --- a/webapp/controller/PassController.class.php +++ b/webapp/controller/PassController.class.php @@ -368,14 +368,21 @@ class PassController{ $season = array(); $season_meta_table = require('../res/season@season.php'); + $number = 0; for ($i = 1; $i <= count($season_meta_table); $i++) { $season = $this->getSeason($i); if (time() >= strtotime($season['open_time']) && time() <= strtotime($season['end_time'])) { + $number = $i; break; } } - $item_multiply = $this->getExplode($season[$name]); + if ($number == 0) { + phpcommon\sendError(ERR_USER_BASE + 3, '没有该奖励 3'); + return; + } + + $item_multiply = $this->getExplode($$season_meta_table[$number][$name]); $items = $item_multiply[$passid - 1]; $reward = array();