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

Fix type comparison in element condition rules #11451

Merged
merged 4 commits into from
Jun 18, 2022

Conversation

lukeholder
Copy link
Member

@lukeholder lukeholder commented Jun 16, 2022

Type mismatch on the element ID prevented element condition rules from matching correctly.

@@ -190,14 +190,14 @@ protected function matchValue(mixed $value): bool
}

if (is_numeric($value)) {
return (int)$value === $elementId;
return (int)$value === (int)$elementId;
Copy link
Member Author

Choose a reason for hiding this comment

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

$elementId can be a string.

@lukeholder lukeholder marked this pull request as ready for review June 16, 2022 15:44
@lukeholder lukeholder requested review from brandonkelly and a team as code owners June 16, 2022 15:44
@brandonkelly brandonkelly merged commit 3d53b63 into develop Jun 18, 2022
@brandonkelly brandonkelly deleted the feature/fix-element-select-condition-type-match branch June 18, 2022 16:43
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