[wp-trac] [WordPress Trac] #64505: REST API: Block renderer passes incomplete block shape
WordPress Trac
noreply at wordpress.org
Tue Mar 17 16:50:17 UTC 2026
#64505: REST API: Block renderer passes incomplete block shape
-------------------------------------+----------------------
Reporter: dlh | Owner: dmsnell
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 7.0
Component: REST API | Version: 5.4
Severity: normal | Resolution: fixed
Keywords: has-patch needs-testing | Focuses:
-------------------------------------+----------------------
Changes (by dmsnell):
* status: reviewing => closed
* resolution: => fixed
Comment:
In [changeset:"62039" 62039]:
{{{
#!CommitTicketReference repository="" revision="62039"
REST API: Add missing properties in block node arrays.
There have been a few places in WordPress where a method creates “an array
representation simulating the output of parse_blocks”, but the array is
missing one or more keys.
The missing keys cause issue with downstream code, which either treats a
block without, for example, `innerBlocks` as invalid input, or more
commonly, assumes that `innerBlocks` is present and accesses it
unconditionally. This can even lead to crashes.
This patch adds the missing properties so that the code behaves as
expected. Since the array values are empty by default, adding these
missing keys does not present any intentional behavioral changes — only a
safer default.
Developed in: https://github.com/WordPress/wordpress-develop/pull/10735
Discussed in: https://core.trac.wordpress.org/ticket/64505
Follow-up to [47360], [57354].
Props dlh, dmsnell, mukesh27, westonruter.
Fixes #64505.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/64505#comment:15>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list