Uncaught TypeError after php8
-
I’m getting various white screens after upgarding to php 8.0.16 most notably on site health page and amp settings.
Here’s the amp settings error:
/wp-admin/admin.php?page=amp-options
/wp-admin/site-health.php (identical error on both)
WordPress 5.9.1
Theme: Newspaper (11.4.1)
Current plugin: AMP (2.2.1)
PHP 8.0.16Error type E_ERROR was caused in line 548 of the file /var/www/vhosts/[siteurl]/httpdocs/wp-content/plugins/amp/src/Admin/SiteHealth.php. Error message: Uncaught TypeError: preg_match(): Argument #2 ($subject) must be of type string, array given in /var/www/vhosts/.../httpdocs/wp-content/plugins/amp/src/Admin/SiteHealth.php:548 Stack trace: #0 /var/www/vhosts/.../httpdocs/wp-content/plugins/amp/src/Admin/SiteHealth.php(548): preg_match() #1 /var/www/vhosts/.../httpdocs/wp-content/plugins/amp/src/Admin/SiteHealth.php(634): AmpProject\AmpWP\Admin\SiteHealth::AmpProject\AmpWP\Admin\{closure}() #2 /var/www/vhosts/.../httpdocs/wp-content/plugins/amp/src/Admin/SiteHealth.php(491): AmpProject\AmpWP\Admin\SiteHealth->check_for_page_caching() #3 /var/www/vhosts/.../httpdocs/wp-content/plugins/amp/src/Admin/OptionsMenu.php(230): AmpProject\AmpWP\Admin\SiteHealth->get_page_cache_detail() #4 /var/www/vhosts/.../httpdocs/wp-includes/class-wp-hook.php(307): AmpProject\AmpWP\Admin\OptionsMenu->enqueue_assets() #5 /var/www/vhosts/.../httpdocs/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters() #6 /var/www/vhosts/.../httpdocs/wp-includes/plugin.php(474): WP_Hook->do_action() #7 /var/www/vhosts/.../httpdocs/wp-admin/admin-header.php(118): do_action() #8 /var/www/vhosts/.../httpdocs/wp-admin/admin.php(239): require_once('...') #9 {main} thrown
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Uncaught TypeError after php8’ is closed to new replies.