Title: Errors with PHP 8.1
Last modified: January 28, 2022

---

# Errors with PHP 8.1

 *  Resolved [Tom](https://wordpress.org/support/users/godsdead/)
 * (@godsdead)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/errors-with-php-8-1/)
 * When I switch from PHP 7.4 to PHP 8.1 I get a bunch of errors in my footer caused
   by Jetpack, why is this not updated to 8.1 yet?
 *     ```
       Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /home/username/public_html/wp-content/plugins/jetpack/functions.compat.php on line 77
   
       Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/username/public_html/wp-content/plugins/jetpack/modules/photon-cdn.php on line 75
   
       Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /home/username/public_html/wp-content/plugins/jetpack/functions.compat.php on line 77
   
       Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /home/username/public_html/wp-content/plugins/jetpack/functions.compat.php on line 77
   
       Deprecated: rtrim(): Passing null to parameter #1 ($string) of type string is deprecated in /home/username/public_html/wp-includes/formatting.php on line 2761
       ```
   

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Contributor [Stef (a11n)](https://wordpress.org/support/users/erania-pinnera/)
 * (@erania-pinnera)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/errors-with-php-8-1/#post-15303402)
 * Hey [@godsdead](https://wordpress.org/support/users/godsdead/),
 * Thanks for reporting this. These notices are not errors. They are deprecations,
   so everything should be still working as expected.
 * You may see such notifications on development when running with `WP_DEBUG` turned
   on, however, the good news is that PHP functionality should have not changed,
   meaning that should be working fine as usual, especially if you check this on
   a production environment with `WP_DEBUG` turned off.
 * If that doesn’t resonate with you, I’d like to take a closer look at your site;
   could you post your site URL here?
      If you want it to remain private, you can
   also contact us via this contact form: [Contact Support](https://jetpack.com/contact-support/?rel=support&hpi=1).
   Thanks!
 *  Thread Starter [Tom](https://wordpress.org/support/users/godsdead/)
 * (@godsdead)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/errors-with-php-8-1/#post-15376886)
 * How strange as I don’t have WP_DEBUG on, hmmm
 *     ```
       // Enable WP_DEBUG mode
       define( 'WP_DEBUG', false );
       ```
   
 * Is set in my wp-config.php
 * Edit, I just found `define( 'WP_DEBUG_DISPLAY', false );` So I will try that,
   not sure why this would display if the debug is false.
    -  This reply was modified 4 years, 3 months ago by [Tom](https://wordpress.org/support/users/godsdead/).
    -  This reply was modified 4 years, 3 months ago by [Tom](https://wordpress.org/support/users/godsdead/).
 *  Thread Starter [Tom](https://wordpress.org/support/users/godsdead/)
 * (@godsdead)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/errors-with-php-8-1/#post-15376903)
 * Did not work, I even tried the lot:
 *     ```
       define( 'WP_DEBUG', false );
       define( 'WP_DEBUG_DISPLAY', false );
       ini_set('display_errors','Off');
       ini_set('error_reporting', 0 );
       ```
   
 * Still showing Deprecated errors.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Errors with PHP 8.1’ is closed to new replies.

 * ![](https://ps.w.org/jetpack/assets/icon.svg?rev=2819237)
 * [Jetpack - WP Security, Backup, Speed, & Growth](https://wordpress.org/plugins/jetpack/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/jetpack/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/jetpack/)
 * [Active Topics](https://wordpress.org/support/plugin/jetpack/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/jetpack/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/jetpack/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Tom](https://wordpress.org/support/users/godsdead/)
 * Last activity: [4 years, 3 months ago](https://wordpress.org/support/topic/errors-with-php-8-1/#post-15376903)
 * Status: resolved