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

Fluid field conditional to check existence of field fails #3246

Closed
robinsowell opened this issue Apr 6, 2023 · 2 comments · Fixed by #3251
Closed

Fluid field conditional to check existence of field fails #3246

robinsowell opened this issue Apr 6, 2023 · 2 comments · Fixed by #3251
Labels
Bug: Accepted Bug has been confirmed, is reproducible, and ready to work on.

Comments

@robinsowell
Copy link
Contributor

EE 7.2.13 - note, user reports same conditional DID work in EE 6.

Say you have a fluid field named 'my_fluid'. In v6

{if my_fluid == ''} Nothing to see here {/if}

Worked. In the current version, it doesn't.

{if ! my_fluid}

That does work, but I don't think we want breaking behavior between 6 and 7 on something like that, and I'd expect it to work like other fields in any case.

@robinsowell robinsowell added the Bug: Accepted Bug has been confirmed, is reproducible, and ready to work on. label Apr 6, 2023
@intoeetive
Copy link
Contributor

This is not related to ExpressionEngine version, but to PHP version.

With PHP 7.4, both conditionals work. With PHP 8.1, only the second condtional works.

@intoeetive
Copy link
Contributor

We also has same issue with Grid (can't find issue for that, but it has been reported several times)

intoeetive added a commit that referenced this issue Apr 11, 2023
…ked correctly in templates when using PHP 8.1
intoeetive added a commit that referenced this issue Apr 11, 2023
…ked correctly in templates when using PHP 8.1

(cherry picked from commit 4f3c528)
intoeetive added a commit that referenced this issue Apr 24, 2023
…ked correctly in templates when using PHP 8.1

(cherry picked from commit 4f3c528)
intoeetive added a commit that referenced this issue Apr 24, 2023
…ked correctly in templates when using PHP 8.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug: Accepted Bug has been confirmed, is reproducible, and ready to work on.
Projects
None yet
2 participants