Title: PHP 8.1 &#8211; PHP Deprecated: strstr()
Last modified: July 6, 2023

---

# PHP 8.1 – PHP Deprecated: strstr()

 *  Resolved [dimal](https://wordpress.org/support/users/dimalifragis/)
 * (@dimalifragis)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/php-8-1-php-deprecated-strstr/)
 * Hi,
 * The LATEST **test/alpha/trunk** version i installed (updated) today, gives the
   following under PHP 8.1.
 * [06-Jul-2023 18:57:02 UTC] PHP Deprecated: strstr(): Passing null to parameter#
   1 ($haystack) of type string is deprecated in /home/wp-content/plugins/wp-super-
   cache/wp-cache-phase2.php on line 1830
 * Thanks !

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

 *  Thread Starter [dimal](https://wordpress.org/support/users/dimalifragis/)
 * (@dimalifragis)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/php-8-1-php-deprecated-strstr/#post-16876951)
 * This also appeared:
 * [07-Jul-2023 06:11:11 UTC] PHP Deprecated: Automatic conversion of false to array
   is deprecated in /home/wp-content/plugins/wp-super-cache/wp-cache-phase2.php 
   on line 1045
 *  Plugin Author [Donncha O Caoimh (a11n)](https://wordpress.org/support/users/donncha/)
 * (@donncha)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/php-8-1-php-deprecated-strstr/#post-16883368)
 * Thanks [@dimalifragis](https://wordpress.org/support/users/dimalifragis/). The
   first one is an error we should trap.
 * The second one is weird. There’s a literal check to see if $wp_cache_oc_key is
   not false on the previous line, but maybe it’s the “elseif” on 1046 that’s causing
   the problem..
 *  Plugin Author [Donncha O Caoimh (a11n)](https://wordpress.org/support/users/donncha/)
 * (@donncha)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/php-8-1-php-deprecated-strstr/#post-16892167)
 * The next release of the plugin will have fixes for these warnings. Thanks for
   reporting them.
 *  Thread Starter [dimal](https://wordpress.org/support/users/dimalifragis/)
 * (@dimalifragis)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/php-8-1-php-deprecated-strstr/#post-16929870)
 * Some more:
    1. [28-Jul-2023 11:49:59 UTC] PHP Deprecated: substr(): Passing null to parameter#
       1 ($string) of type string is deprecated in /home/wp-content/plugins/wp-super-
       cache/wp-cache-phase2.php on line 227
 *  1. [28-Jul-2023 11:49:59 UTC] PHP Deprecated: strtolower(): Passing null to parameter#
       1 ($string) of type string is deprecated in /home/wp-content/plugins/wp-super-
       cache/wp-cache-phase2.php on line 808
 *  Plugin Support [Animesh Gaurav](https://wordpress.org/support/users/bizanimesh/)
 * (@bizanimesh)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/php-8-1-php-deprecated-strstr/#post-16955112)
 * Hey [@dimalifragis](https://wordpress.org/support/users/dimalifragis/) – thanks
   for reporting them. I have forwarded those to the team as well. 🙂
 *  Plugin Support [Animesh Gaurav](https://wordpress.org/support/users/bizanimesh/)
 * (@bizanimesh)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/php-8-1-php-deprecated-strstr/#post-16955437)
 * Hey [@dimalifragis](https://wordpress.org/support/users/dimalifragis/) – we added
   them [for the fix here](https://github.com/Automattic/jetpack/issues/32336). 
   Thanks for reporting!
 * If you have any more questions or come across any other issues, let us know, 
   we’ll be happy to help. 🙂

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

The topic ‘PHP 8.1 – PHP Deprecated: strstr()’ is closed to new replies.

 * ![](https://ps.w.org/wp-super-cache/assets/icon-256x256.png?rev=3506220)
 * [WP Super Cache](https://wordpress.org/plugins/wp-super-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-super-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-super-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-super-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-super-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-super-cache/reviews/)

 * 6 replies
 * 3 participants
 * Last reply from: [Animesh Gaurav](https://wordpress.org/support/users/bizanimesh/)
 * Last activity: [2 years, 10 months ago](https://wordpress.org/support/topic/php-8-1-php-deprecated-strstr/#post-16955437)
 * Status: resolved