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] Legacy data with null-values clash with the stronger typing #153

Conversation

Daniel-Ateles
Copy link
Contributor

Sometimes legacy data could trigger an exception because of null-values.

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 ?? '');
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will look into that.

Copy link
Contributor

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;
and setcondition
public function setCondition(ConditionInterface $condition): static;
wouldn't work with strings

Copy link
Contributor

Choose a reason for hiding this comment

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

@Daniel-Ateles any updates? 👍

Copy link
Contributor

Choose a reason for hiding this comment

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

@Daniel-Ateles friendly reminder ⏰ 🍭

Copy link
Contributor Author

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.

@mattamon
Copy link
Contributor

Closed #153 (comment)

@mattamon mattamon closed this Aug 27, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Aug 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants