From d0f2c2992f233567e1a7c22b7c29b1a0cc3216dc Mon Sep 17 00:00:00 2001 From: holan20180123 <56391770@qq.com> Date: Mon, 19 Oct 2020 16:50:04 +0800 Subject: [PATCH] * Determine if id is a number. --- module/bug/model.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/module/bug/model.php b/module/bug/model.php index 83004357a9..a094a1b67e 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -2748,10 +2748,11 @@ class bugModel extends model if(strpos($action->extra, ':') !== false) { list($extra, $id) = explode(':', $action->extra); - $action->extra = $extra; - if($id) + if($id and is_numeric($id)) { - $name = $this->dao->select('title')->from(TABLE_BUG)->where('id')->eq($id)->fetch('title'); + $action->extra = $extra; + + $name = $this->dao->select('title')->from(TABLE_BUG)->where('id')->eq($id)->fetch('title'); if($name) $action->appendLink = html::a(zget($this->config->mail, 'domain', common::getSysURL()) . helper::createLink($action->objectType, 'view', "id=$id", 'html'), "#$id " . $name); } }