-
Notifications
You must be signed in to change notification settings - Fork 187
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
A string with a number could be passed as a boolean value #1435
base: main
Are you sure you want to change the base?
Conversation
Thanks for opening your first pull request! If you haven't yet signed our Contributor License Agreement (CLA), then please do so that we can accept your contribution. A link should appear shortly in this PR if you have not already signed one. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1435 +/- ##
============================================
- Coverage 73.59% 73.57% -0.03%
- Complexity 2685 2687 +2
============================================
Files 387 387
Lines 7977 7981 +4
============================================
+ Hits 5871 5872 +1
- Misses 2106 2109 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 4 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
Hi @stickeerehan thanks for the contribution. We also need to be compliant with the OpenTelemetry spec as much as possible, and here we run into this part: https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/#boolean-value
Having a quick play with this: my_bool = true
my_quoted_bool = "true"
So, quoting boolean values in php.ini seems to work, and maybe we need to document that? |
get_cfg_var() evaluates "true" in php.ini to "1" which is not correctly parsed by the boolean parser.
Fixes issue raised on #1431.