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

fix(check): env check false positive when value is defined but null #58

Merged
merged 2 commits into from
Jun 18, 2021

Conversation

superbiche
Copy link
Contributor

UKFast\HealthCheck\Checks\EnvHealthCheck creates false positives when an environment value is set but its value is null.

This happens because if (env($env) === null) returns true for null values, as env('MISSING_KEY') returns null.

Passing a (configurable) default value to env() makes it easy to check if the default value was returned (which is what we really want).

@superbiche superbiche force-pushed the fix/env-check-nullable-values branch from c0ef6ab to e22e0d6 Compare June 17, 2021 20:00
@Gman98ish
Copy link
Contributor

@superbiche nice one, lgtm

@Gman98ish Gman98ish merged commit 43fc12e into ans-group:master Jun 18, 2021
@Gman98ish
Copy link
Contributor

@superbiche that's been tagged at v1.12.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants