discord webhook fix
This commit is contained in:
@@ -28,7 +28,14 @@ try {
|
||||
foreach ($lines as $line) {
|
||||
if (strpos($line, '=') !== false && strpos($line, '#') !== 0) {
|
||||
list($key, $value) = explode('=', $line, 2);
|
||||
$envVars[trim($key)] = trim($value);
|
||||
$key = trim($key);
|
||||
$value = trim($value);
|
||||
// Remove surrounding quotes if present
|
||||
if ((substr($value, 0, 1) === '"' && substr($value, -1) === '"') ||
|
||||
(substr($value, 0, 1) === "'" && substr($value, -1) === "'")) {
|
||||
$value = substr($value, 1, -1);
|
||||
}
|
||||
$envVars[$key] = $value;
|
||||
}
|
||||
}
|
||||
debug_log("Environment variables loaded");
|
||||
|
||||
Reference in New Issue
Block a user