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

.env.local failed to open stream php error when WP_ENV='development' and .env.local does not exist. #601

Closed
App1e5auce opened this issue Jul 26, 2021 · 5 comments · Fixed by #603

Comments

@App1e5auce
Copy link

Fresh bedrock install.

When you only have .env (not .env.local) and your WP_ENV is set to development, WordPress admin will have an extra space at the top of the screen. This is caused by an invisible failed to open stream error when .env.local is not found.

To verify the cause, you can simply go into your application.php file and remove '.env.local' from the array on line 32. This removes php error, and the space at the top of WordPress admin.

@github-actions
Copy link

Hi @App1e5auce, It looks like the issue template is missing from this issue. Please take a look at the Contribution Guidelines, which will tell you exactly what your ticket has to contain in order to be processable. Please do not use the issue tracker for personal support requests. Use Roots Discourse to ask the Roots community for help, or hire someone from the community.

@retlehs retlehs reopened this Jul 26, 2021
@Furo42
Copy link

Furo42 commented Jul 27, 2021

I can confirm this bug. The error is thrown also when WP_ENV variable is set to something else e.g. "production" or "staging".

@mrgesco
Copy link

mrgesco commented Jul 30, 2021

Proposed a PR for this #602

@tangrufus
Copy link
Contributor

For reference: b2781b8#commitcomment-54196503

@fab120
Copy link
Contributor

fab120 commented Jul 30, 2021

I'm creating the pull request now :-)

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 a pull request may close this issue.

6 participants