-
Notifications
You must be signed in to change notification settings - Fork 33
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] Legacy data with null-values clash with the stronger typing #153
[bugfix] Legacy data with null-values clash with the stronger typing #153
Conversation
Sometimes legacy data could trigger an exception because of null-values.
@@ -120,7 +120,7 @@ public function setValue(string $key, mixed $value, bool $ignoreEmptyValues = fa | |||
return $this; | |||
} | |||
} | |||
$this->$method($value); | |||
$this->$method($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.
But we can't be sure it's always of type string
, right?
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.
Will look into that.
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.
It seems that setactions
public function setActions(array $action): static; |
setcondition
public function setCondition(ConditionInterface $condition): static; |
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.
@Daniel-Ateles any updates? 👍
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.
@Daniel-Ateles friendly reminder ⏰ 🍭
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.
@Corepex I guess this PR solved faulty DB-data in my case and should have been solved by removing the faulty rules from the db table instead. This PR can be closed/removed.
Closed #153 (comment) |
Sometimes legacy data could trigger an exception because of null-values.