Skip to content

handle null argument in range function#758

Merged
boulter merged 4 commits into
masterfrom
fix-null-range
Sep 30, 2021
Merged

handle null argument in range function#758
boulter merged 4 commits into
masterfrom
fix-null-range

Conversation

@boulter

@boulter boulter commented Sep 30, 2021

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

deprecated function

@jasmith-hs jasmith-hs left a comment

Copy link
Copy Markdown
Contributor

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