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

[4.x]: Environment variables being parsed as integers #11422

Closed
alexmglover opened this issue Jun 10, 2022 · 2 comments
Closed

[4.x]: Environment variables being parsed as integers #11422

alexmglover opened this issue Jun 10, 2022 · 2 comments

Comments

@alexmglover
Copy link

alexmglover commented Jun 10, 2022

What happened?

Description

I have created a couple of environment variables that are being converted to integers, which is causing the value to be incorrectly converted.

For example:

"0123" becomes "123"
"+17777777777" becomes "17777777777"

Expected behavior

I would expect the value to be output as "0123" and "+17777777777" when I use App::env.

Actual behavior

Value is output as "123" and "17777777777"

Craft CMS version

4.0.4

Here is the code causing the issue: https://github.com/craftcms/cms/blob/develop/src/helpers/App.php#L88

@brandonkelly
Copy link
Member

Thanks for reporting that. Just tightened this up a bit for the next release.

@brandonkelly
Copy link
Member

Craft 4.0.5 is out now with that fix.

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

No branches or pull requests

2 participants