-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Cast column label to string to stop magic casting issues. #21366
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.
Looks ok to me on its own, the failing tests seem to be unrelated, so I'd say good to go for 4.x
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.
This doesn't look complete to me. You have only changed the place where rowsIndexByLabel
is filled, but all places where that array is used to find entries are untouched. This will have the effect, that keys won't be found anymore. Methods like getRowIdFromLabel
imho also needs to be adjusted.
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.
Looks good now. Before merging this one, we should ensure that there already is a PR for 5.x-dev, so re don't forget to apply the changes there as well.
Good point, here it is #21393 |
Description:
Labels can be anything, and PHP likes trying to cast itself. ( see https://3v4l.org/X6v6E#v8.1.24 )
This causes errors, and we can safely assume the key for the array should always be a string.
I didn't modify
Row.getColumn
's response type or cast within there as there is a lot of code that depends on that and the change would be riskier.Fixes: #21357
Review