Title: PHP 8.1 &#8211; PHP Deprecated
Last modified: July 11, 2023

---

# PHP 8.1 – PHP Deprecated

 *  Resolved [dimal](https://wordpress.org/support/users/dimalifragis/)
 * (@dimalifragis)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/php-8-1-php-deprecated-3/)
 * Hi,
 * Those came up after PHP 8.1 switch.
 * [11-Jul-2023 10:52:56 UTC] PHP Deprecated: preg_match(): Passing null to parameter#
   2 ($subject) of type string is deprecated in /home/wp-content/plugins/contextual-
   related-posts/includes/admin/save-settings.php on line 350
 * [11-Jul-2023 10:52:56 UTC] PHP Deprecated: preg_match(): Passing null to parameter#
   2 ($subject) of type string is deprecated in /home/wp-content/plugins/contextual-
   related-posts/includes/admin/save-settings.php on line 323
 * Thanks !

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

 *  Plugin Author [Ajay](https://wordpress.org/support/users/ajay/)
 * (@ajay)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/php-8-1-php-deprecated-3/#post-16887733)
 * Please can you check what you have in the Exclude Terms and Exclude on Terms 
   options in the settings page. Former is in List tab and latter in Output tab.
 * You might want to make them blank first and then resave. Something is causing
   them to return null.
 *  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-3/#post-16888752)
 * Both those were empty.
 *  Plugin Author [Ajay](https://wordpress.org/support/users/ajay/)
 * (@ajay)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/php-8-1-php-deprecated-3/#post-16890709)
 * I’m unable to replicate this error in my tests. Where exactly or when exactly
   do you see it?
 * I’ve tried it with the fields empty and with text in there. Even tried random
   text.
 *  Plugin Author [Ajay](https://wordpress.org/support/users/ajay/)
 * (@ajay)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/php-8-1-php-deprecated-3/#post-16890724)
 * One thing to try is if you edit the file and change those lines to do attempt
   a conversion to string.
 * `preg_match( '/(._)((._):(\d+))/i', (string) $slug, $matches );`
 *  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-3/#post-16890730)
 * Ok, it is not that important.
 * I’m seeing this when i save after changing some options, in List Tuning, like
   taxonomies 2 settings or/and Disable contextual matching.
 * As i said it is not important, i posted that just for our information.
 *  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-3/#post-16890807)
 * Ok, good news. Doing the change you provided, seems to solve the issue. I changed
   many thing back and forth, and i see no notice.
 * Thank you
 *  Plugin Author [Ajay](https://wordpress.org/support/users/ajay/)
 * (@ajay)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/php-8-1-php-deprecated-3/#post-16890846)
 * That’s great! Thanks for confirming. I’ll take care of this in the next update.

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

The topic ‘PHP 8.1 – PHP Deprecated’ is closed to new replies.

 * ![](https://ps.w.org/contextual-related-posts/assets/icon-256x256.png?rev=2985705)
 * [Contextual Related Posts](https://wordpress.org/plugins/contextual-related-posts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contextual-related-posts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contextual-related-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/contextual-related-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contextual-related-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contextual-related-posts/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [Ajay](https://wordpress.org/support/users/ajay/)
 * Last activity: [2 years, 11 months ago](https://wordpress.org/support/topic/php-8-1-php-deprecated-3/#post-16890846)
 * Status: resolved