Title: PHP 8 not compatible
Last modified: December 20, 2020

---

# PHP 8 not compatible

 *  [ABCdatos](https://wordpress.org/support/users/abcdatos/)
 * (@abcdatos)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/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:56`
 * Downgrading 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; // @codingStandardsIgnoreLine
       ```
   
 * to:
 *     ```
       		@$a = 'HEADER'; // @codingStandardsIgnoreLine
       		@$b = 'TEXTCOLOR'; // @codingStandardsIgnoreLine
       ```
   
 * Change 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.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/sparkling/2.4.11/screenshot.png)
 * Sparkling
 * [Support Threads](https://wordpress.org/support/theme/sparkling/)
 * [Active Topics](https://wordpress.org/support/theme/sparkling/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/sparkling/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/sparkling/reviews/)

## Tags

 * [constant](https://wordpress.org/support/topic-tag/constant/)
 * [header](https://wordpress.org/support/topic-tag/header/)
 * [php 8](https://wordpress.org/support/topic-tag/php-8/)
 * [undefined](https://wordpress.org/support/topic-tag/undefined/)

 * 0 replies
 * 1 participant
 * Last reply from: [ABCdatos](https://wordpress.org/support/users/abcdatos/)
 * Last activity: [5 years, 5 months ago](https://wordpress.org/support/topic/php-8-not-compatible/)
 * Status: not resolved