Currently, Shopware identifies debug mode by checking the key APP_DEBUG from $_SERVER and from $_ENV. If none found, then it checks if $appEnv is not "prod".
The problem is that, if we define APP_DEBUG as false on .env file, it gets read as string "false" during this check, and converting "false" to bool, will result in true making the check not work correctly.
Possible solution:
I modified this check a bit and managed to get a satisfying result:
Situation:
Currently, Shopware identifies debug mode by checking the key APP_DEBUG from $_SERVER and from $_ENV. If none found, then it checks if $appEnv is not "prod".
The problem is that, if we define APP_DEBUG as
false
on .env file, it gets read as string "false" during this check, and converting "false" to bool, will result intrue
making the check not work correctly.Possible solution:
I modified this check a bit and managed to get a satisfying result: