[wp-trac] [WordPress Trac] #64612: WP_Duotone: Fatal error when duotone attribute is an array instead of a string

WordPress Trac noreply at wordpress.org
Mon Feb 9 17:08:32 UTC 2026


#64612: WP_Duotone: Fatal error when duotone attribute is an array instead of a
string
--------------------------------------+-------------------------------
 Reporter:  jorgefilipecosta          |       Owner:  jorgefilipecosta
     Type:  defect (bug)              |      Status:  closed
 Priority:  normal                    |   Milestone:  7.0
Component:  Editor                    |     Version:  trunk
 Severity:  normal                    |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+-------------------------------
Changes (by jorgefilipecosta):

 * owner:  (none) => jorgefilipecosta
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"61603" 61603]:
 {{{
 #!CommitTicketReference repository="" revision="61603"
 Block Supports: Prevent fatal error in `WP_Duotone` when the duotone
 attribute is an array.

 Adds type checks to `get_slug_from_attribute()`, `is_preset()`, and
 `get_all_global_style_block_names()` to handle cases where the duotone
 attribute is an array of custom colors instead of a preset reference
 string.
 This prevents an error when `preg_match()` receives an array instead of a
 string.

 Props jorgefilipecosta, westonruter, xavilc.
 Fixes #64612.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/64612#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list