Skip to content
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

handle null argument in range function #758

Merged
merged 4 commits into from
Sep 30, 2021
Merged

handle null argument in range function #758

merged 4 commits into from
Sep 30, 2021

Conversation

boulter
Copy link
Contributor

@boulter boulter commented Sep 30, 2021

Passing a null argument to the range function would throw a NullPointerException instead of being handled as an interpret error. That's fixed now.

I also logged template errors for bad values in the truncate and truncateHtml functions instead of using the ENGINE_LOG which no one looks at.

switch (args.length) {
case 0:
if (NumberUtils.isNumber(arg1.toString())) {
if (NumberUtils.isCreatable(arg1.toString())) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

deprecated function

Copy link
Contributor

@jasmith-hs jasmith-hs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similarly, the ENGINE_LOG is used in the TruncateHtmlFilter. It would be nice to have that add an error too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants