update v1.0.7.9 R.C.
This is a Release Candidate. We are still testing.
This commit is contained in:
14
vendor/vlucas/phpdotenv/src/Loader.php
vendored
14
vendor/vlucas/phpdotenv/src/Loader.php
vendored
@@ -147,7 +147,7 @@ class Loader
|
||||
*/
|
||||
protected function isComment($line)
|
||||
{
|
||||
return strpos(trim($line), '#') === 0;
|
||||
return strpos(ltrim($line), '#') === 0;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -235,8 +235,8 @@ class Loader
|
||||
/**
|
||||
* Resolve the nested variables.
|
||||
*
|
||||
* Look for {$varname} patterns in the variable value and replace with an existing
|
||||
* environment variable.
|
||||
* Look for {$varname} patterns in the variable value and replace with an
|
||||
* existing environment variable.
|
||||
*
|
||||
* @param string $value
|
||||
*
|
||||
@@ -295,7 +295,7 @@ class Loader
|
||||
*
|
||||
* @param string $name
|
||||
*
|
||||
* @return string
|
||||
* @return string|null
|
||||
*/
|
||||
public function getEnvironmentVariable($name)
|
||||
{
|
||||
@@ -335,6 +335,12 @@ class Loader
|
||||
return;
|
||||
}
|
||||
|
||||
// If PHP is running as an Apache module and an existing
|
||||
// Apache environment variable exists, overwrite it
|
||||
if (function_exists('apache_getenv') && function_exists('apache_setenv') && apache_getenv($name)) {
|
||||
apache_setenv($name, $value);
|
||||
}
|
||||
|
||||
putenv("$name=$value");
|
||||
|
||||
$_ENV[$name] = $value;
|
||||
|
||||
Reference in New Issue
Block a user