• Resolved dimal

    (@dimalifragis)


    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

    (@ajay)

    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

    (@dimalifragis)

    Both those were empty.

    Plugin Author Ajay

    (@ajay)

    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

    (@ajay)

    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

    (@dimalifragis)

    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

    (@dimalifragis)

    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

    (@ajay)

    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.