[wp-trac] [WordPress Trac] #49094: preg_match() expects parameter 2 to be string on line 417 of wp-includes/class-wp-block-parser.php
WordPress Trac
noreply at wordpress.org
Sat Apr 4 13:36:50 UTC 2020
#49094: preg_match() expects parameter 2 to be string on line 417 of wp-includes
/class-wp-block-parser.php
--------------------------+------------------------------
Reporter: thenerdcave | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Editor | Version: 5.3.2
Severity: critical | Resolution:
Keywords: | Focuses:
--------------------------+------------------------------
Changes (by philippmuenchen):
* severity: normal => critical
Comment:
On WP 5.4 this also breaks the Customizer when saving WP-Customizer fields
that save arrays to theme_mod instead of strings. Example:
On "publish" in Customizer, wp-ajax.php is called with the parameter
{{{
&customized=%7B%22global_typo_copy%22%3A%7B%22font-
family%22%3A%22Lato%22%2C%22font-weight%22%3A400%7D%2C%22global_typo_copy
%5Bfont-family%5D%22%3A%22Lato%22%7D
}}}
The saving fails with
{{{
preg_match() expects parameter 2 to be string, array given at
/Volumes/Webprojekte/sueco.de/web/wp/wp-includes/class-wp-block-
parser.php:417
}}}
and the Customizer breaks without updating the value.
@thenerdcave suggestion fixes it for me, too.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/49094#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list