Skip Navigation

[Resolved] An error occurred when we upgraded the PHP version from 7.4 to 8.1

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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 4 replies, has 3 voices.

Last updated by Waqar 1 year, 3 months ago.

Assisted by: Waqar.

Author
Posts
#2650441
teamlaescrow.com_wp-admin_.png

We've recently upgraded the PHP version from 7.4 to 8.1. However, following this update, we are encountering difficulties accessing the WordPress dashboard. It's worth noting that the dashboard functions properly when using PHP version 7.4, but issues arise when PHP version 8.1 is utilized.

Here are the backend details for WordPress:

Here I have attached the log file for your reference. Also i am sharing the log file with details as below :
====================================================
Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /var/www/wp-includes/functions.php on line 7127

Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/wp-includes/functions.php on line 2182

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /var/www/wp-includes/functions.php on line 7127

Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/wp-includes/functions.php on line 2182

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /var/www/wp-includes/functions.php on line 7127

Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/wp-includes/functions.php on line 2182

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /var/www/wp-includes/functions.php on line 7127

Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/wp-includes/functions.php on line 2182

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /var/www/wp-includes/functions.php on line 7127

Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/wp-includes/functions.php on line 2182

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /var/www/wp-includes/functions.php on line 7127

Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/wp-includes/functions.php on line 2182

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /var/www/wp-includes/functions.php on line 7127

Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/wp-includes/functions.php on line 2182

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /var/www/wp-includes/functions.php on line 7127

Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/wp-includes/functions.php on line 2182

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /var/www/wp-includes/functions.php on line 7127

Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/wp-includes/functions.php on line 2182

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /var/www/wp-includes/functions.php on line 7127

Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/wp-includes/functions.php on line 2182

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /var/www/wp-includes/functions.php on line 7127

Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/wp-includes/functions.php on line 2182

Warning: foreach() argument must be of type array|object, string given in /var/www/wp-content/plugins/types/vendor/toolset/types/embedded/includes/custom-taxonomies.php on line 63

Warning: foreach() argument must be of type array|object, string given in /var/www/wp-content/plugins/types/vendor/toolset/types/embedded/includes/custom-types.php on line 332

Warning: foreach() argument must be of type array|object, string given in /var/www/wp-content/plugins/types/vendor/toolset/types/embedded/includes/custom-types.php on line 332

Warning: foreach() argument must be of type array|object, string given in /var/www/wp-content/plugins/types/vendor/toolset/types/embedded/includes/custom-types.php on line 332

Warning: foreach() argument must be of type array|object, string given in /var/www/wp-content/plugins/types/vendor/toolset/types/embedded/includes/custom-taxonomies.php on line 76

Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /var/www/wp-content/plugins/types/vendor/toolset/types/wpcf.php:405 Stack trace: #0 /var/www/wp-includes/class-wp-hook.php(310): wpcf_upgrade_stored_taxonomies_with_builtin('') #1 /var/www/wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters(NULL, Array) #2 /var/www/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #3 /var/www/wp-settings.php(632): do_action('init') #4 /var/www/wp-config.php(105): require_once('/var/www/wp-set...') #5 /var/www/wp-load.php(50): require_once('/var/www/wp-con...') #6 /var/www/wp-admin/admin.php(34): require_once('/var/www/wp-loa...') #7 /var/www/wp-admin/index.php(10): require_once('/var/www/wp-adm...') #8 {main} thrown in /var/www/wp-content/plugins/types/vendor/toolset/types/wpcf.php on line 405
====================================================

I have attached the log file for your reference. Additionally, I am providing the log file with the following details:

Thanks,

#2650481

Nigel
Supporter

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

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

Hi there

First, please note this is a public forum and if we need site credentials from you we will set up a private reply where you can share them securely. I've edited your post to remove the sensitive data.

Types shouldn't have any problems with PHP 8.1 (it isn't fully tested with PHP 8.2), so it looks like there may be a problem particular to your site.

Is it possible for you to set up your site on a staging server running PHP 8.1? The first thing to check is whether the problem occurs with Types in isolation (other plugins disabled, and running a default theme like twentytwentyone), to know if a conflict with some other code is contributing to the issue.

#2650623

I've established the staging environment and attempted to alter the theme while deactivating plugins, but the error persists, exclusively linked to the Toolset plugin. Please inform me of where I can provide access to the staging site so that you can perform debugging there.

#2650651

Hi,

I'm setting your next reply as private, so that you can share access details for the staging website.

We'll also need your permission to download the clone/snapshot of the website in case it needs to be investigated on a different server.

regards,
Waqar

#2651353

Thank you for sharing the access details.

During troubleshooting on your website's clone, I was able to fix this error, through these steps:

1. From WP Admin -> Toolset -> Taxonomies, open the edit screens of both the built-in taxonomies (Category & Tags) and use the 'Save Taxonomy' button.
( you don't have to make any changes )

2. After this, you can switch to PHP 8 and you won't face the same error.