phpdotenv
phpdotenv copied to clipboard
Equals Symbol in last line of multiline variable causes issues.
It looks like the logic for multiline support does not allow for equals signs on the final line.
e.g. This will not load the variable as expected.
BASE64_ENCODED_MULTILINE="qS1zCzMVVUJWQShokv6YVYi+ruKSC/bHV7GmEiyVkLaBWJHNVHCHsgTksEBsy8wJ uwycAvR07ZyOJJed4XTRMKnKp1/v+6UATpWzkIjZXytK+pD+XlZimUHTx3uiDcmU jhQX1wWSxHDqrSWxeIJiTD+BuUyId8FzmXQ3TcBydJ474tmOU2F492ubk3LAiZ18 mhiRGoshXAOSbS/P3+RZi4bDeNE/No4="
While it obviously isn't a case that occurs frequently I came across this when needing to load a certificate without the header/footer e.g. -----END CERTIFICATE----- but still requiring the multiline support. Equals signs are commonly found at the end of certificates and other base64 encoded strings, so it seems like a case worth covering if possible.
Thanks for getting in touch. What version of the library are you using, please?
Thanks @GrahamCampbell for taking a look - I am using v5.4.1
Fixed in v4.3.0 and v5.5.0.