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 issue with empty category in overwriteDemand #2496

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

kanow
Copy link
Contributor

@kanow kanow commented Jun 18, 2024

Related: #2495

If more than one category is used for a filter form, then empty categories (not selected in from) are still added to the category constraint. This PR will remove empty categories in overwriteDemand object.

@@ -203,6 +203,7 @@ protected function overwriteDemandObject(NewsDemand $demand, array $overwriteDem
if (!is_array($propertyValue)) {
$propertyValue = GeneralUtility::trimExplode(',', $propertyValue, true);
}
$propertyValue = is_array($propertyValue) ? GeneralUtility::intExplode(',', implode(',',$propertyValue), true) : $propertyValue;
Copy link
Owner

Choose a reason for hiding this comment

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

should be

$propertyValue = is_array($propertyValue) ? GeneralUtility::intExplode(',', implode(',', $propertyValue), true) : $propertyValue;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, of course 😁

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.

2 participants