From 1673b9aae5ccbc0739b5f37ae6f58f9c808d4776 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Tue, 13 Apr 2021 17:46:28 +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/GiiModel.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Gii/GiiModel.php b/Gii/GiiModel.php index f781506b..c2d31d0f 100644 --- a/Gii/GiiModel.php +++ b/Gii/GiiModel.php @@ -217,8 +217,9 @@ use Database\ActiveRecord; $prefixed = $this->db->tablePrefix; if (!empty($prefixed)) { - $field = str_replace($prefixed, '', $field); if (str_starts_with($field, $prefixed)) { + $field = str_replace($prefixed, '', $field); + $field = '{{%' . $field . '}}'; } }