josegonzalez/php-dotenv

Comments aligned with tabs are treated as extensions of a string

Closed this issue · 1 comments

If you configure your file like this:

MAINTENANCE_MODE 				= false 					# Is in maintenance mode?

instead of

MAINTENANCE_MODE 				= false # Is in maintenance mode?

the first one when dumped will actually be a string of "false # Is in maintenance mode?" which boolean implicitly evals as true because it's indented (to align with other line's comments) using tabs. Changing it to a space causes it to be corrected evaluated as bool false.

This is sort of unexpected, and it'd be nice if you could indent comments using tabs since it makes longer config files a lot easier to read.

Actually this doesn't support multiple spaces either. Just realized this need to be reported upstream. Reported m1/Env#11