From 06e0b66eb1e27084446069c7581013afc01871b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Tue, 30 Mar 2021 16:33:12 +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 --- Gii/GiiBase.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Gii/GiiBase.php b/Gii/GiiBase.php index c99ef000..c09f5cec 100644 --- a/Gii/GiiBase.php +++ b/Gii/GiiBase.php @@ -160,7 +160,13 @@ abstract class GiiBase protected function getClassProperty(ReflectionClass $class): string { $html = ''; + + $rc = $class->getParentClass()->getConstants(); + foreach ($class->getConstants() as $key => $val) { + if (isset($rc[$key])) { + continue; + } if (is_numeric($val)) { $html .= ' const ' . $key . ' = ' . $val . ';' . "\n";