discord webhook fix

This commit is contained in:
2026-01-01 16:40:04 -05:00
parent 3abaf3d13f
commit bfac062dd3
4 changed files with 70 additions and 11 deletions

View File

@@ -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");