Skip Navigation

[Resolved] Warning: preg_match() expects parameter 2 to be string, array given in

This support ticket is created 4 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

Tagged: 

This topic contains 4 replies, has 4 voices.

Last updated by cortJ 4 years, 11 months ago.

Assisted by: Nigel.

Author
Posts
#1411857

On both this site and hidden link, I suddenly get a lot of code at the top of several pages. If I deactivate Toolset it disappears. Everything is up to date and I've done nothing special on both sites, to make this appear at the same time at both.

Here is an example from page – hidden link

Warning: preg_match() expects parameter 2 to be string, array given in /home/guidance/public_html/wp-includes/class-wp-block-parser.php on line 417

Warning: strlen() expects parameter 1 to be string, array given in /home/guidance/public_html/wp-includes/class-wp-block-parser.php on line 489

Warning: preg_match() expects parameter 2 to be string, array given in /home/guidance/public_html/wp-includes/class-wp-block-parser.php on line 417

Warning: strlen() expects parameter 1 to be string, array given in /home/guidance/public_html/wp-includes/class-wp-block-parser.php on line 489

#1411985

goM

I have encountered the same problem.
In my case, it seems that the issue appears in a post with a Featured Image set.
https://toolset.com/forums/topic/php-warning-is-displayed-on-post-edit-screen-after-updating-to-wordpress-5-3-1/

#1411991

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

You likely saw these messages after upgrading to WordPress 5.3.1.

We've identified the problem and the developers have already proposed a fix, which we expect to be published tomorrow morning.

I'll let you know when it's out.

#1411995

Looking forward to the update! Thank you!

#1423595

Edited:
We're also facing these warnings when using Types and Forms. Created a new thread since this was marked as resolved: https://toolset.com/forums/topic/php-warnings-with-preg_match-and-strlen-when-using-forms-and-types/