shopware / development

MIT License
189 stars 169 forks source link

Debug mode check not accurate #117

Closed lscarpi closed 2 years ago

lscarpi commented 4 years ago

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".

image

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:

image

shyim commented 4 years ago

Feel free to create an PR :)

tinect commented 3 years ago

@lscarpi would you like to create PR? :-)

JoshuaBehrens commented 3 years ago

\json_decode("false") works good as well 😁

shyim commented 2 years ago

I am closing this as the line has been changed in the meanwhile