Extra check to make sure _ENV array is inited before appending to it

This commit is contained in:
2023-01-06 10:13:20 +09:00
parent 404f6713f8
commit 3668e6552c

View File

@@ -94,6 +94,10 @@ class DotEnv
// strip ending " and EVERYTHING that follows after that
$line = $matches[1];
}
// just be sure it is init before we fill
if (!isset($_ENV[$var])) {
$_ENV[$var] = '';
}
// strip line of slashes
$_ENV[$var] .= stripslashes($line);
}