[wp-trac] [WordPress Trac] #65379: Elements: Guard against non-string className in render filter
WordPress Trac
noreply at wordpress.org
Mon Jun 1 01:55:37 UTC 2026
#65379: Elements: Guard against non-string className in render filter
-----------------------------+-----------------------------
Reporter: aaronrobertshaw | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 7.1
Component: Editor | Version: trunk
Severity: normal | Keywords: gutenberg-merge
Focuses: |
-----------------------------+-----------------------------
This ticket tracks the backport of PHP files for the following Gutenberg
update:
https://github.com/WordPress/gutenberg/pull/78841
Adds a safeguard in elements block support rendering to prevent fatal
errors when a block’s className attribute is not a string. The backport
updates `wp_render_elements_class_name()` to bail early and return block
content unchanged for invalid `className` values, and includes a PHPUnit
test covering this regression case.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/65379>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list