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

[IndexBundle] Fix range filter to work if min/max value = 0 #1606

Merged

Conversation

ychanan
Copy link
Contributor

@ychanan ychanan commented Apr 5, 2021

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Fixed tickets #1602

@@ -37,8 +37,8 @@ public function prepareValuesForRendering(FilterConditionInterface $condition, F
'label' => $condition->getLabel(),
'minValue' => $minValue,
'maxValue' => $maxValue,
'currentValueMin' => $currentFilter[$field . '-min'] ? $currentFilter[$field . '-min'] : $minValue,
'currentValueMax' => $currentFilter[$field . '-max'] ? $currentFilter[$field . '-max'] : $maxValue,
'currentValueMin' => ('' !== (string)$currentFilter[$field . '-min']) ? $currentFilter[$field . '-min'] : $minValue,
Copy link
Member

Choose a reason for hiding this comment

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

I think we should check if the index $currentFilter[$field . '-min'] actually is set here? PHP with strict-types would trigger a warning here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Resolved in a new commit.

@dpfaffenbauer dpfaffenbauer merged commit ffc58a8 into coreshop:2.2 Apr 23, 2021
@dpfaffenbauer
Copy link
Member

thanks

@ychanan ychanan deleted the fix/range-filter-condition-processor-v-2-2 branch May 12, 2021 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants