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

Fixes #618: Process fields with integer value 0 correctly #619

Merged
merged 2 commits into from
Dec 16, 2018
Merged

Fixes #618: Process fields with integer value 0 correctly #619

merged 2 commits into from
Dec 16, 2018

Conversation

PhilippGrashoff
Copy link
Collaborator

The stacked ternary operator led to a wrong processing of integer 0 values, this fixes it and the value of the dropdown's hidden input is set correctly to 0 instead of an empty string.

Fixes #618

The stacked ternary operator led to a wrong processing of integer 0 values, this fixes it and the value of the dropdown's hidden input is set correctly to 0 instead of an empty string.
@codecov
Copy link

codecov bot commented Dec 12, 2018

Codecov Report

Merging #619 into develop will decrease coverage by <.01%.
The diff coverage is 66.66%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop     #619      +/-   ##
=============================================
- Coverage      68.37%   68.36%   -0.01%     
  Complexity      1839     1839              
=============================================
  Files            100      100              
  Lines           4351     4353       +2     
=============================================
+ Hits            2975     2976       +1     
- Misses          1376     1377       +1
Impacted Files Coverage Δ Complexity Δ
src/FormField/DropDown.php 89.09% <66.66%> (-1.48%) 30 <0> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ace9bb8...a160f12. Read the comment docs.

@codecov
Copy link

codecov bot commented Dec 12, 2018

Codecov Report

Merging #619 into develop will decrease coverage by <.01%.
The diff coverage is 66.66%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop     #619      +/-   ##
=============================================
- Coverage      68.37%   68.36%   -0.01%     
  Complexity      1839     1839              
=============================================
  Files            100      100              
  Lines           4351     4353       +2     
=============================================
+ Hits            2975     2976       +1     
- Misses          1376     1377       +1
Impacted Files Coverage Δ Complexity Δ
src/FormField/DropDown.php 89.09% <66.66%> (-1.48%) 30 <0> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ace9bb8...cb9132e. Read the comment docs.

@DarkSide666 DarkSide666 self-requested a review December 16, 2018 11:39
Copy link
Member

@DarkSide666 DarkSide666 left a comment

Choose a reason for hiding this comment

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

Well, you could just put braces in that ternary line :)

But this way it's more clear. Thanks !

@PhilippGrashoff
Copy link
Collaborator Author

Yeah, I could have put braces, but unless you know about that ternary stacked mess, you won't understand the braces. And as probably hardly anyone knows about that totally stupid behavior of stacked ternarys, I thought this is more clear.

@DarkSide666 DarkSide666 merged commit 2dacff2 into atk4:develop Dec 16, 2018
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.

Ternary operator messes up integer with value = 0 in DropDown::getInput()
2 participants