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

"Right" Lava Filter throws error if string is shorter than requested length #2902

Closed
1 task done
cabal95 opened this issue Mar 24, 2018 · 1 comment
Closed
1 task done
Labels
Priority: High Affects most production Rock installs in a way that will be noticed. Status: Confirmed It's clear what the subject of the issue is about, and what the resolution should be. Topic: Lava Related to the Lava templating language. Type: Bug Confirmed bugs or reports that are very likely to be bugs. x-Fixed in v7.4
Milestone

Comments

@cabal95
Copy link
Member

cabal95 commented Mar 24, 2018

Prerequisites

  • Put an X between the brackets on this line if you have done all of the following:

Description

On v8.0 at least, possibly 7.x, if you do use the Right lava filter and request n characters, where n is less more than the total length of the string, then an exception is thrown. This does not seem to affect the Left filter.

Steps to Reproduce

  1. {{ '123' | Right:4 }}

Expected behavior:

I should get the original string back.

Actual behavior:

I get an exception.

Versions

  • Rock Version: 8.x
  • Client Culture Setting: en-US
@cabal95 cabal95 added Type: Bug Confirmed bugs or reports that are very likely to be bugs. Status: Confirmed It's clear what the subject of the issue is about, and what the resolution should be. Priority: High Affects most production Rock installs in a way that will be noticed. Topic: Lava Related to the Lava templating language. labels Mar 24, 2018
@JimMichael
Copy link
Collaborator

Confirmed on 7.3. I think you mean "where n is MORE than the total length of the string...", though?

jonedmiston added a commit that referenced this issue Mar 24, 2018
…t length is greater than the string length (Fixes #2902)
@crayzd92 crayzd92 added this to the v7 milestone Mar 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: High Affects most production Rock installs in a way that will be noticed. Status: Confirmed It's clear what the subject of the issue is about, and what the resolution should be. Topic: Lava Related to the Lava templating language. Type: Bug Confirmed bugs or reports that are very likely to be bugs. x-Fixed in v7.4
Projects
None yet
Development

No branches or pull requests

4 participants