From f7188ff82a30ae1b22e7a98d7142b6540f5184c7 Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Fri, 13 Mar 2020 20:50:05 +0800 Subject: [PATCH] Update normal.php --- function/normal.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/function/normal.php b/function/normal.php index e6a4d95..e6bf1e8 100644 --- a/function/normal.php +++ b/function/normal.php @@ -41,17 +41,21 @@ function getConfig($str, $disktag = '') global $InnerEnv; global $Base64Env; //include 'config.php'; - if ($disktag=='') $disktag = $_SERVER['disktag']; $s = file_get_contents('config.php'); $configs = substr($s, 18, -2); if ($configs!='') { $envs = json_decode($configs, true); if (in_array($str, $InnerEnv)) { - if (in_array($str, $Base64Env)) return equal_replace($envs[$disktag][$str],1); - else return $envs[$disktag][$str]; + if ($disktag=='') $disktag = $_SERVER['disktag']; + if (isset($envs[$disktag][$str])) { + if (in_array($str, $Base64Env)) return equal_replace($envs[$disktag][$str],1); + else return $envs[$disktag][$str]; + } } else { - if (in_array($str, $Base64Env)) return equal_replace($envs[$str],1); - else return $envs[$str]; + if (isset($envs[$str])) { + if (in_array($str, $Base64Env)) return equal_replace($envs[$str],1); + else return $envs[$str]; + } } } return '';