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

Wrap modifier doesn't ignore null value #2299

Closed
ReneWeCode opened this issue Aug 26, 2020 · 0 comments
Closed

Wrap modifier doesn't ignore null value #2299

ReneWeCode opened this issue Aug 26, 2020 · 0 comments

Comments

@ReneWeCode
Copy link
Contributor

Bug Description

If the field is empty and the value is null, the wrap modifier is still wrapping.
This is causing an empty html tag.

How to Reproduce

  • Save an empty text fieldtype
  • Try to output with a wrap modifier like: {{ text | wrap:h3.title }}
  • In the DOM we now have <h3 class="title"></h3>

Extra Detail

{{ text | dump }} confirms that the field is null

Environment

Statamic version: 3.0.0

PHP version: 7.3

Install method (choose one):

  • Fresh install from statamic/statamic
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

No branches or pull requests

1 participant