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

CustomVariables: Fix frontend display of value 0 #13295

Merged
merged 1 commit into from Aug 15, 2018

Conversation

MichaelRoosz
Copy link
Contributor

Line 37:
The value of 0 is wrongly displayed as "not defined" because in PHP the statement "0 == 'string value'" equals true. This is because, if you compare an integer with a string in PHP, it converts the string to an integer first (will always be 0 in this case).

Line 39:
After the fix for line 37, the value 0 will be displayed as '-'. with the strval conversion, we will see the real value of '0' in the frontend.

@MichaelRoosz MichaelRoosz changed the title Fix frontend display of value 0 CustomVariables: Fix frontend display of value 0 Aug 14, 2018
@sgiehl sgiehl added the Needs Review PRs that need a code review label Aug 14, 2018
@sgiehl
Copy link
Member

sgiehl commented Aug 15, 2018

Thanks @MichaelHeerklotz for this PR 👍

@sgiehl sgiehl merged commit 9a8750b into matomo-org:3.x-dev Aug 15, 2018
@sgiehl sgiehl added this to the 3.6.0 milestone Aug 15, 2018
@mattab mattab added the Bug For errors / faults / flaws / inconsistencies etc. label Aug 28, 2018
InfinityVoid pushed a commit to InfinityVoid/matomo that referenced this pull request Oct 11, 2018
@MichaelRoosz MichaelRoosz deleted the fix_cv_0_display branch October 29, 2023 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. Needs Review PRs that need a code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants