mirror of
https://gitlab.com/TheGamecraft/c-cms.git
synced 2026-04-22 19:19:09 -04:00
ALPHA 3.0.2a
This commit is contained in:
12
vendor/vlucas/phpdotenv/src/Loader.php
vendored
12
vendor/vlucas/phpdotenv/src/Loader.php
vendored
@@ -253,14 +253,14 @@ class Loader
|
||||
$parts = explode(' #', $value, 2);
|
||||
$value = trim($parts[0]);
|
||||
|
||||
// Check if value is a comment (usually triggered when empty value with comment)
|
||||
if (preg_match('/^#/', $value) > 0) {
|
||||
$value = '';
|
||||
}
|
||||
|
||||
// Unquoted values cannot contain whitespace
|
||||
if (preg_match('/\s+/', $value) > 0) {
|
||||
throw new InvalidFileException('Dotenv values containing spaces must be surrounded by quotes.');
|
||||
// Check if value is a comment (usually triggered when empty value with comment)
|
||||
if (preg_match('/^#/', $value) > 0) {
|
||||
$value = '';
|
||||
} else {
|
||||
throw new InvalidFileException('Dotenv values containing spaces must be surrounded by quotes.');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user