[wp-trac] [WordPress Trac] #61744: preg_match fails when className when $block['attrs']['className'] is an array *which is case when "extraClasses" is set*

WordPress Trac noreply at wordpress.org
Wed Jul 24 16:08:38 UTC 2024


#61744: preg_match fails when className when $block['attrs']['className'] is an
array *which is case when "extraClasses" is set*
--------------------------+-----------------------------
 Reporter:  larslo        |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  6.6.1
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 extraClasses is not fount in wp-content, but in wp-includes

 [24-Jul-2024 15:47:17 UTC] PHP Fatal error:  Uncaught TypeError:
 preg_match(): Argument #2 ($subject) must be of type string, array given
 in wp-includes/block-supports/elements.php:248
 Stack trace:
 #0 wp-includes/block-supports/elements.php(248):

 [24-Jul-2024 15:47:45 UTC] PHP Fatal error:  Uncaught TypeError:
 preg_match(): Argument #2 ($subject) must be of type string, array given
 in wp-includes/block-supports/block-style-variations.php:237
 Stack trace:
 #0 wp-includes/block-supports/block-style-variations.php(237): preg_match
 ('/\\bis-style-(\\S...', Array, NULL)

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/61744>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list