fix : getenv(null)

be58a17328
pull/532/head^2
qkqpttgf 2022-01-27 22:06:26 +08:00 committed by GitHub
parent c6f8c1cd5c
commit c0fdfd341a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -226,6 +226,7 @@ function main($path)
return output('Please visit <a href="' . $tmp . '">' . $tmp . '</a>.', 301, [ 'Location' => $tmp ]); return output('Please visit <a href="' . $tmp . '">' . $tmp . '</a>.', 301, [ 'Location' => $tmp ]);
} }
if ($_SERVER['admin']) { if ($_SERVER['admin']) {
if (!$_SERVER['disktag']) $_SERVER['disktag'] = '';
if (!class_exists($_GET['AddDisk'])) require 'disk' . $slash . $_GET['AddDisk'] . '.php'; if (!class_exists($_GET['AddDisk'])) require 'disk' . $slash . $_GET['AddDisk'] . '.php';
$drive = new $_GET['AddDisk']($_GET['disktag']); $drive = new $_GET['AddDisk']($_GET['disktag']);
return $drive->AddDisk(); return $drive->AddDisk();