Closed devnix closed 5 years ago
I guess this is because in production the php may be configured in a different way so it does not display errors.
Some formats like mo or php array include the headers under the key "", so if you write, for example: echo __('')
you have the headers. To prevent this, simply use the option includeHeaders
to false
. For example:
$translations->toMoFile('filename.mo', ['includeHeaders' => false]);
I will try it, right now I'm not able to test it on production. Thank you so much!
Hi! We've found an issue which could expose some information.
On development settings, if you call
__()
or$t->register()
without parameters, it throws a warning like the following:Here is a sample of the code:
But on our production settings, it doesn't throw anything, and instead of returning
null
, which is what the original gettext functions would do, it returns the po header