PHP 8 not compatible
-
After upgrading to PHP 8.0 the site does not work -shows a white page- and causes this error:
Got error 'PHP message: PHP Fatal error: Uncaught Error: Undefined constant "HEADER" in [...]/wp-content/themes/sparkling/inc/custom-header.php:56Downgrading to PHP 7.4, site works again.
As far as I understand the code at wp-content/themes/sparkling/inc/custom-header.php, this must be chenged:
@$a = HEADER; // @codingStandardsIgnoreLine @$b = TEXTCOLOR; // @codingStandardsIgnoreLineto:
@$a = 'HEADER'; // @codingStandardsIgnoreLine @$b = 'TEXTCOLOR'; // @codingStandardsIgnoreLineChange must be applied to parent theme, not child theme.
With this changes, site works in PHP 8.
Regards.
The topic ‘PHP 8 not compatible’ is closed to new replies.
