Skip navigation

Open

Reported for: WPML Multilingual CMS 4.6.9

Topic Tags: Bug

Overview of the issue

Under some scenarios, you may encounter a PHP warning like the following, particularly if you are using Google XML Sitemaps plugin alongside our system

Warning: preg_match(): Unknown modifier '-' in /wp-content/plugins/sitepress-multilingual-cms/inc/absolute-links/absolute-links.class.php on line 186

Workaround

Please, make sure of having a full backup of your site before proceeding.

  • Open …/wp-content/plugins/sitepress-multilingual-cms/inc/absolute-links/absolute-links.class.php file.
  • Look for line 186.
  • Replace:
    if ( preg_match( "!^$match!", $request_match, $matches ) || preg_match( "!^$match!", urldecode( $request_match ), $matches ) ) {
    
  • With:
    if ( preg_match( "~^$match~", $request_match, $matches ) || preg_match( "~^$match~", urldecode( $request_match ), $matches ) ) {
    

комментария 2 на “Google XML Sitemaps - PHP Warning: preg_match(): Unknown modifier...”

Написать ответ

Please stay on topic and be respectful to others. If you need help with issues not related to this post, use our Support Forum to start a chat or submit a ticket.

Вы можете использовать эти метки:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>