From 116d1891a1807713f53c45805659ec03f049c24d Mon Sep 17 00:00:00 2001 From: chenxiaojun <956334972@qq.com> Date: Fri, 20 Dec 2019 15:16:21 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=90=8E=E5=8F=B0>=E6=8E=A8?= =?UTF-8?q?=E5=B9=BF=E5=91=98=E7=AE=A1=E7=90=86>=E5=85=AC=E4=BC=9A?= =?UTF-8?q?=E5=88=86=E6=88=90=E7=AE=A1=E7=90=86--=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Common/Common/extend.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Application/Common/Common/extend.php b/Application/Common/Common/extend.php index 8d9b15e40..476064d0d 100644 --- a/Application/Common/Common/extend.php +++ b/Application/Common/Common/extend.php @@ -1102,15 +1102,17 @@ function getGameSelleRatioByPromote($promoteId = null, $gameId = null) if (empty($promoteId) || empty($gameId)) { return false; } + $promoteId = intval($promoteId); $gameId = intval($gameId); $promote = M('promote', 'tab_')->find($promoteId); + if (empty($promote)) { return false; } if ($promote['level'] != 1) { - $promoteId = explode('/', trim($promote['chain'], '/'))[0]; - $promoteId = intval($promoteId); + $chain = explode('/', trim($promote['chain'], '/')); + $promoteId = empty($chain[0]) ? 0 : intval($chain[0]); } $map['promote_id'] = $promoteId;