From c0fdfd341ab1ec27fc19c5d5565fb50f98fd1b8d Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Thu, 27 Jan 2022 22:06:26 +0800 Subject: [PATCH] fix : getenv(null) be58a17328fc712eba0fd31dce493b3201de8f63 --- common.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common.php b/common.php index 969054f..13f6278 100644 --- a/common.php +++ b/common.php @@ -226,9 +226,10 @@ function main($path) return output('Please visit ' . $tmp . '.', 301, [ 'Location' => $tmp ]); } if ($_SERVER['admin']) { + if (!$_SERVER['disktag']) $_SERVER['disktag'] = ''; if (!class_exists($_GET['AddDisk'])) require 'disk' . $slash . $_GET['AddDisk'] . '.php'; - $drive = new $_GET['AddDisk']($_GET['disktag']); - return $drive->AddDisk(); + $drive = new $_GET['AddDisk']($_GET['disktag']); + return $drive->AddDisk(); } else { $url = $_SERVER['PHP_SELF']; /*if ($_GET) {