wecodemore / wpstarter

Easily bootstrap whole site Composer packages for WordPress.
https://wecodemore.github.io/wpstarter/
MIT License
246 stars 35 forks source link

[WPStarter 3] Empty env value not used #79

Closed Chrico closed 5 years ago

Chrico commented 5 years ago

Describe the bug If i define an empty value for an env var, this var is not stored/used or visible in caching. This should work, since some settings like COOKIE_DOMAIN="" in a Multisite enviornment with different domains are often used.

To Reproduce Steps to reproduce the behavior:

  1. Create an .env file and basic setup
  2. Add COOKIE_DOMAIN="" or COOKIE_DOMAIN=''
  3. Open the Page
  4. See .env.cached.php

In SYMFONY_DOTENV_VARS the variable is listed, but below in define|putenv|$_ENV|$_SERVER the definition is missing.

Expected behavior The COOKIE_DOMAIN should occure in the cached env file.

System (please complete the following information):

Chrico commented 5 years ago

Any news here?

gmazzap commented 5 years ago

Fixed. I added unit tests to ensure empty strings from env are retained properly.