Problem/Motivation
As blocks are rendered as part of block_block_view()
the object fetched from the query is not validated prior to returning populating and returning the block's data array.
Where database contain legacy references to blocks that no longer exist this will cause trying to access property of none object
notices.
Whilst very minor, and not effecting site functionality, it's my view that object structure should be validated before being acted upon.
Rather than introduce large changes to validate database records during block lifecycle i recommened that we simply
Steps to reproduce
Pass an unknown $delta
to block_block_view()
.
Observe the trying to access property of none object notice.
Proposed resolution
Rather than introduce large changes to validate database records during block lifecycle i recommened that we simply validate that an object is returned from the block fetch query and that the properties of that object exist as we expect them to.
Where they don't simply return null content.
Remaining tasks
Patch review.
Note that patch was created against the 7.x branch, and application tested against 7.84.
User interface changes
None
API changes
None
Data model changes
None
Release notes snippet
None