New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use of uninitialized value $tmpl in split at .../Mojo/Template.pm line 218. #321
Comments
I don't understand a word, please add some code to your proposal/bug report. |
The error should be easy to reproduce. Create a template index.html.ep with the following text: <!DOCTYPE html><html><body>ü</body></html> encoded as ISO-8859-1 (that is, using the single byte 0xFC rather than the two-byte sequence 0xC3 0xBC for the ü character). Then try requesting this template from morbo and you will see... nothing and the error message in console. |
No, i mean what is the actual change you are proposing? |
Catch the undef error and die with "invalid encoding detected in file index.html.ep". |
Excellent, thanks! |
Thanks for the explanation. :) |
Reporting against version 2.81:
In default configuration when a template's encoding is non-UTF-8 (but let's say ISO-8859-1, with an umlaut character), the title message is written to STDERR (at least in morbo) and no content whatsoever is sent to the browser. Please provide a more helpful error message (or even output garbage characters for fault tolerance's sake).
The text was updated successfully, but these errors were encountered: