-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Open
Labels
Description
Version
11.0.1
What did you expect to happen?
Not triggering an error when .env is missing from the sage folder.
What actually happens?
An error is triggered due to missing .env file.
It doesn't show output straight away, but it shows margin in the left sidebar which shouldn't be there. Upon further inspection it seems that the code throws a silent error.
file_get_contents(/var/www/html/wp-content/themes/<your-theme-name>/.env): Failed to open stream: No such file or directory"
Steps to reproduce
Install the theme with composer
composer create-project roots/sage=11.0.1 your-theme-nameAdd minimal .wp-env.json config
{
"core": "WordPress/WordPress#6.8",
"phpVersion": "8.3",
"themes": ["."]
}Get the last error
// functions.php
header("Content-Type: application/json");
die(var_dump(error_get_last()));System info
No response
Log output
Please confirm this isn't a support request.
Yes

