Closed
Description
Symfony version(s) affected: 4.3.3
Description
When using the %env(default::FOO)%
environment variable processor to get the value or NULL
, the app fails with a PHP warning:
Warning: array_key_exists() expects parameter 2 to be array, null given
The bug only happens when the env var is not defined, and only the first time you load a page; after that, it works and the parameter is correctly set to null
when the env var is not set.
Running cache:clear
does trigger the bug every time, though.
How to reproduce
- create a new project:
symfony new bug && cd bug
- edit
config/services.yaml
and add the following:parameters: app.foo: '%env(default::APP_FOO)%'
- run
bin/console cache:clear