-
-
Notifications
You must be signed in to change notification settings - Fork 344
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
Catch possible null value error in ModelFilter #1800
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you able to add a functional test for this bug ?
src/Filter/ModelFilter.php
Outdated
@@ -147,6 +147,10 @@ private function buildInExpression(ProxyQueryInterface $query, string $alias, Fi | |||
$orX = $queryBuilder->expr()->orX(); | |||
|
|||
foreach ($data->getValue() as $value) { | |||
if (null === $value) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can rebase 4.x to fix the ci |
Done |
Thanks, I dont have a computer until next week. It's on my todo to review/merge/release this |
Subject
I am targeting this branch, because is a patch.
Changelog
Got the error when using the
ModelFilter
in combination with aModelAutocompleteType
.The error might show up if you bookmark a link (e.g. /list?filter[user][value]=entityID123) and you than remove the referenced entity. The
hasValue
check passes, because you provide a valid value, but there is no entity so you receive a null error.