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
Areablock: Accept array for setDataFromResource() #16773
base: 11.2
Are you sure you want to change the base?
Conversation
Review Checklist
|
$unserializedData = Tool\Serialize::unserialize($data); | ||
if (is_string($data)) { | ||
$unserializedData = Tool\Serialize::unserialize($data); | ||
} else { |
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.
We could remove the else and just set $unserializedData = $data as default no?
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.
@mattamon This was possible, but I made it more type safe. It was possible to put a wrong type and nothing happens. I think it should be throw a InvalidArgumentException() like in the renderlet editable.
df84246
to
ce041a5
Compare
Quality Gate passedIssues Measures |
https://github.com/orgs/pimcore/discussions/16672
See #16701