From e02403121425c20a7b7aa0908f53a3282241251b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Wed, 29 Sep 2021 11:39:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kiri-gii/GiiBase.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/kiri-gii/GiiBase.php b/kiri-gii/GiiBase.php index 00805625..b2564b2b 100644 --- a/kiri-gii/GiiBase.php +++ b/kiri-gii/GiiBase.php @@ -246,8 +246,17 @@ abstract class GiiBase $_array[] = $_key . ': ' . $argument . ''; } } - $over .= " #[" . end($explode) . "(" . implode(',', $_array) . ")] + + if (empty($_array)){ + $end = " #[" . end($explode) . "] "; + }else{ + $end = " #[" . end($explode) . "(" . implode(',', $_array) . ")] +"; + } + if (!str_contains($over, $end)){ + $over .= $end; + } } }