From 1251195b8fd247746ef8ac784a5402383fac9dfc Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Mon, 18 Jan 2021 16:36:45 +0800 Subject: [PATCH] fix: rename to an exist tag --- common.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/common.php b/common.php index d78518e..429685e 100644 --- a/common.php +++ b/common.php @@ -1086,11 +1086,12 @@ function EnvOpt($needUpdate = 0) $v = preg_replace('/[^0-9a-zA-Z|_]/i', '', $v); $f = substr($v, 0, 1); if (strlen($v)==1) $v .= '_'; - //if (in_array($v, $CommonEnv)) { if (isCommonEnv($v)) { - return message('Do not input ' . $envs . '
', 'Error', 201); + return message('Do not input ' . $envs . '
', 'Error', 201); } elseif (!(('a'<=$f && $f<='z') || ('A'<=$f && $f<='Z'))) { - return message('Please start with letters'); + return message('', 'Please start with letters', 201); + } elseif (getConfig($v)) { + return message('', 'Same tag', 201); } else { $tmp[$k] = $v; }