Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return null for missing env vars #14253

Conversation

brandonkelly
Copy link
Member

Updates craft\helpers\App::parseEnv() to start returning null when a missing environment variable name is passed in. (Previously the $ENV_VAR string would just be returned verbatim.)

This makes it possible to set config values in some environments but not others, such as a $SECRET_KEY variable that might be needed to connect to S3 locally, but not on production.

Copy link

linear bot commented Jan 31, 2024

@brandonkelly brandonkelly merged commit 1b54032 into 5.0 Jan 31, 2024
6 checks passed
@brandonkelly brandonkelly deleted the feature/cms-1249-craftparseenv-should-return-null-for-missing-env-vars branch January 31, 2024 05:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant