Skip Navigation

[Resolved] PHP 8.1 error

This thread is resolved. Here is a description of the problem and solution.

Problem:

Customer was seeing this upon enabling the debug mode:

Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in (...)


Solution:

We are in the process of cleaning deprecation notes to make Toolset fully compatible with PHP 8.1+.

Some deprecation notices are expected in this process.

For now you can just hide the notices as everything seems to be working ok.

Please access your website files and edit the "wp-config.php" file on the root folder of your WordPress installation and add the code below into the file:

define( 'WP_DEBUG', false );

Please add the code above the line below:

/* That's all, stop editing! Happy blogging. */

That will turn off the logging you have mentioned and you can continue using your website.

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.

Our next available supporter will start replying to tickets in about 4.54 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Sao_Paulo (GMT-03:00)

This topic contains 1 reply, has 2 voices.

Last updated by Mateus Getulio 8 months, 4 weeks ago.

Assisted by: Mateus Getulio.

Author
Posts
#2685951

I have a view widget throwing the following error.

Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in (...)

Any fix different from downgrading to an older PHP version?

#2686024

Mateus Getulio
Supporter

Languages: English (English )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi there.

We are in the process of cleaning deprecation notes to make Toolset fully compatible with PHP 8.1+.

Please bear in mind that this record is a deprecation notice rather than an error.

That means it works now but it might not in the future PHP versions live version higher than PHP 8.2.

So for now you can just hide the notices as everything seems to be working ok.

Would you please access your website files and edit the "wp-config.php" file on the root folder of your WordPress installation and add the code below into the file:

define( 'WP_DEBUG', false );

Please add the code above the line below:

/* That's all, stop editing! Happy blogging. */

That will turn off the logging you have mentioned and you can continue using your website.

Thanks.