WordPress.org

Support

Support » Plugins and Hacks » Pugin SEO Ultimate error: PHP Deprecated Function eregi_replace

Pugin SEO Ultimate error: PHP Deprecated Function eregi_replace

  • Hello,

    In the server log is the following message:

    PHP Deprecated: Function eregi_replace() is deprecated in /home/wihe/public_html/myspace.wihe.net/wp-content/plugins/seo-ultimate/modules/titles/titles.php

    Solutions?

    Regards

Viewing 3 replies - 1 through 3 (of 3 total)
  • in the titles.php change:

    return eregi_replace('<title>[^<]*</title>', '<title>'.$title.'</title>', $head);

    to

    return preg_match('/<title>[^<]*</title>/', '<title>'.$title.'</title>', $head);

    pcaines, that doesn’t work for me.

    This does:
    Change:
    return eregi_replace('<title>[^<]*</title>', '<title>'.$title.'</title>', $head);

    To:

    $pattern = '/<title>([^<]*)<\/title>/is';
    $replace = '<title>'.$title.'</title>';
    return preg_replace($pattern, $replace, $head);

    Yes you are right, thanks for the update

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Pugin SEO Ultimate error: PHP Deprecated Function eregi_replace’ is closed to new replies.
Skip to toolbar