Getting a preg_replace unknown modifier '/' notice for Infinite SEO

Warning: preg_replace() [function.preg-replace]: Unknown modifier '/' in /home/shelter/public_html/ on line 191

Warning: preg_split() [function.preg-split]: Unknown modifier '/' in /home/shelter/public_html/ on line 195

  • ken_edelstein

    @Jack Kittering et al An update: I've activated WPMU Nelo, which as I novice I'd like to stick with because it's familiar. But I'm still having the same problem when I upload posts at

    I've pasted below the PHP code that the message (see attachment I sent you above) says has " unknown modifier '/' "(near the lines the message mentions). But I don't see the unknown modifier. Any ideas on what's going on? Is this an Infinite SEO issue?

    Thanks, Ken

    if ((!$maxlinks || ($links < $maxlinks)) && (trailingslashit($url)!=$thisurl) && !in_array( !empty( $options['casesens'] ) ? $name : strtolower($name), $arrignore) && (!$maxsingleurl || $urls[$url]<$maxsingleurl) ) {

    if ( !empty( $options['customkey_preventduplicatelink'] ) || $strpos_fnc($text, $name) !== false )
    $name= preg_quote($name, '/');

    if( !empty( $options['customkey_preventduplicatelink'] ) )
    $name = str_replace(',','|',$name);

    $maxsingle = ( !empty( $options['customkey_preventduplicatelink'] )) ? 1 : $maxsingle;
    $target = empty($options['target_blank']) ? '' : 'target="_blank"';
    $regexp=str_replace('$name', $name, $reg_post);
    if ((defined('WDS_AUTOLINKS_ON_THE_FLY_CHECK') && WDS_AUTOLINKS_ON_THE_FLY_CHECK) && !preg_match($regexp, strip_shortcodes($text))) continue;
    $newtext = preg_replace($regexp, $replace, $text, $maxsingle);

    if ($newtext!=$text) {
    $replacement_count = count(preg_split($regexp, $text))-1;
    $replacement_count = $replacement_count > 0 ? $replacement_count : 1;
    $links += $replacement_count > $maxsingle ? $maxsingle : $replacement_count;
    if (!isset($urls[$url]))

  • ken_edelstein

    @Vladislav and/or @Jack Kitterhing -- on the chance that the problem I'm having with Infinite SEO has something to do with a conflict, please take a look at the additional information belwo.

    Two other sites that I have running on the same theme with the same plugins aren't having problems; the site with the problems ( had been previously installed with a different theme, and when it was using that theme (LivingOS-Pure) some code work was done on the site. Recently, I backed up that site, uninstalled it, and reinstalled it. Some of the old files appeared on the re-installation, and now I am wondering if somewhere in here is the conflict.

    To assist you in identifying the conflict with Infinite SEO, I've gone through all the folders to see what the "bad" site has that one of the "good" sites doesn't have. If you believe that any of these files might be the cause of a conflict with Infinite SEO, could you please let me know and suggest a remedy? Although I'm not eager to delete them willy-nilly, I could delete these files because I do have them backed up.

    So here are the differences between and similar site on WP multisite that works fine (neither of these sites has much content at this time):

    has these files that aren’t on the other site:

    Meanwhile, doesn’t have this file that’s on the other site

    is empty while the site that works fine has four files in it

    has this file that isn’t on the other two sites:

    has this folder and file that aren’t on the other site:
    /backup-22d40 (folder)

    both are the same

    both are the same

    has LivingOS-Pure while the other site doesn’t have it

    contains the following folders that the other site doesn’t have:

    doesn’t have

    /public-html/ has:
    /css (folder)
    /images (folder)
    /js (folder)
    /pomo (folder)
    /SimplePie (folder)
    /Text (folder)
    /theme-compat (folder)

  • Vladislav


    I believe I might have spotted an issue in the settings you pasted above, and this configuration caused a similar error to happen for me too - the problem is using a comma (,) instead of a dot (.) in the URL for this autolink:

    GreenHomeChronicle, http://greenhomechronicle,com

    Can you please double-check your setting and see if you have the ,com (comma-com) instead of the .com (dot-com) in your actual settings and see if fixing that solves the issue for you?