pimcore
pimcore copied to clipboard
Remove useless exception handling in Area(Block)::buildInfoObject()
The exception handling in Area(Block)::buildInfoObject()
was rather useless.
In Area
, $info
was set to null
in case of an error, but later $info->setParams(...)
gets called, which would crash.
In Areablock
, an error was logged if one of the first three setters failed (which is rather unlikely), and I think it'll be better to fail hard in this case.
I also simplified the code to determine the $params
a bit.
Review Checklist
- [x] Target branch (
10.5
for bug fixes, others11.x
) - [x] Tests (if it's testable code, there should be a test for it - get help)
- [x] Docs (every functionality needs to be documented, see here)
- [x] Migration incl.
install.sql
(e.g. if the database schema changes, ...) - [x] Upgrade notes (deprecations, important information, migration hints, ...)
- [x] Label
- [x] Milestone
@jdreesen Thank you!