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

[BUGFIX] Fix ternary condition behaviors #394

Merged
merged 2 commits into from
Jul 9, 2018

Conversation

NamelessCoder
Copy link
Member

@NamelessCoder NamelessCoder commented Jul 9, 2018

This patch corrects the following problems for
ternary conditions:

  • Dotted paths were not detected correctly.
  • The “then” part was mandatory
  • Negating the condition did not work correctly

All three described cases are working now.

Fixes: #148

This patch corrects the following problems for
ternary conditions:

* Dotted paths were not detected correctly.
* The “then” part was mandatory
* Negating the condition did not work correctly

All three described cases are working now.
@@ -10,7 +10,12 @@
<f:else>Not touched</f:else>
</f:if>

Ternary expression: {checkTernary ? ternaryTrue : ternaryFalse}
Ternary expression without then case: {ternaryTrue ? : ternaryFalse}
Copy link
Member

Choose a reason for hiding this comment

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

I assume this also works with ?: instead of ? :? If yes, then we should prefer that since that's the common notation in PHP.

Copy link
Member Author

Choose a reason for hiding this comment

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

Works both without and with any number and type of spaces between the parts.

Avoid people thinking that spaces are necessary here.
@mbrodala mbrodala merged commit bcd0ff4 into TYPO3:master Jul 9, 2018
@NamelessCoder NamelessCoder deleted the features/fixternary branch July 9, 2018 12:55
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.

None yet

2 participants