Title: Critical error with PHP8
Last modified: June 28, 2022

---

# Critical error with PHP8

 *  Resolved [glgdev](https://wordpress.org/support/users/glgdev/)
 * (@glgdev)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/critical-error-with-php8/)
 * Hi, I am trying to update my php to 8 but when I do this I got a critical error
   with this on screen :
 *     ```
       '; $widgets['hero']['after_title'] = ''; return $widgets; } add_filter( 'primer_sidebars', 'alter_primer_widgets' ); /** * Add additional H1 tag to blog page. * * @return mixed Markup for the additional title. */ function primer_additional_blog_h1() { if ( ! is_home() ) { return; } printf( '
       %s
       ', esc_attr__( 'Google blog SEO par RankToPay', 'primer' ) ); } add_action( 'primer_after_header', 'primer_additional_blog_h1', 15 ); add_filter( 'primer_the_page_title_args', function( $args ) { $args['wrapper'] = 'span'; return $args; } ); add_filter( 'primer_the_page_title_args', function( $args ) { $args['wrapper'] = 'span'; $args['atts']['style'] ='font-size: 40px;'; return $args; } ); ?>
       There has been a critical error on this website.
       ```
   
 * any idea on how to fix ?
 * thank you

Viewing 1 replies (of 1 total)

 *  [Milos Vlaisavljevic](https://wordpress.org/support/users/gdmilos/)
 * (@gdmilos)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/critical-error-with-php8/#post-15810961)
 * Hey [@glgdev](https://wordpress.org/support/users/glgdev/),
    Thanks for reaching
   out and sorry for the delayed response.
 * Could you please enable the debug mode in the wp-config file? Please see how 
   to do that:
    [https://uk.godaddy.com/help/enable-debugging-to-display-errors-in-wordpress-24013](https://uk.godaddy.com/help/enable-debugging-to-display-errors-in-wordpress-24013)
   Once you’ve enabled the debug mode, please reload your homepage in order to find
   more details regarding the critical error on your site. The error is most probably
   related to some of your plugins since the Primer theme works fine even on PHP
   8.0 (make sure to have the latest version of the Primer theme active).
 * Please note that PHP 7.4 is still the first choice when it comes to WordPress
   sites since not all the themes and plugins are compatible with newer versions.
   Even the latest versions of some themes and plugins cannot work on PHP 8.0 so
   having PHP 7.4 is still highly recommended. However, if you’d like to have PHP
   8.0 active, please enable the debug mode and you will be able to find which plugin(
   s) trigger errors. Then, you can try to update/delete critical plugin(s) as a
   fixing solution.
 * I hope this helps. 🙂
 * Kind Regards,
    Milos | GoDaddy

Viewing 1 replies (of 1 total)

The topic ‘Critical error with PHP8’ is closed to new replies.

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

## Tags

 * [critical error](https://wordpress.org/support/topic-tag/critical-error/)

 * 1 reply
 * 2 participants
 * Last reply from: [Milos Vlaisavljevic](https://wordpress.org/support/users/gdmilos/)
 * Last activity: [3 years, 11 months ago](https://wordpress.org/support/topic/critical-error-with-php8/#post-15810961)
 * Status: resolved