• Resolved Marco Florian

    (@marcorfg)


    I receive this warning message three times when I’m in the /checkout page:

    Warning: preg_match(): Unknown modifier 'c' in /home/grievingtogether/public_html/wp-content/plugins/wordpress-https/lib/WordPressHTTPS/Module/DomainMapping.php on line 43

    Settings:

    SSL Host: domain.com
    Port: blank
    Force SSL Admin: checked
    Force SSL Exclusively: checked
    Remove Unsecure Elements: unchecked
    Debug Mode: unchecked
    Proxy: No
    Admin Menu Location: Settings.

    Secure Filters:
    /checkout

    I’m using WordPress 3.8.1. Also, the HTTPS is working just fine, but with those warnings at the top of the page.

    Thanks.

    http://wordpress.org/plugins/wordpress-https/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter Marco Florian

    (@marcorfg)

    I went to the line and tried a few things.

    (1) preg_quote($http_domain, ‘/’)
    – This would change “\d.gravatar.com” to “\\d\.gravatar\.com”. Which is right, but we need the \d to be parsed as regexp.

    (2) preg_match(‘|’ . $http_domain . ‘|’, $url, $matches);
    – I changed the delimiters to another character, but again, we could be using it inside the regexp.

    (3) str_replace(‘/’, ‘\/’, $http_domain)
    – I just decided to use this one. It is working fine, no more warnings. Try it out and make the fix if applicable and/or give me a recommendation please.

    Thanks.

    Hi,

    I’m having the same problem.

    The “preg_match(): Unknown modifier ‘c’ in /home/grievingtogether/public_html/wp-content/plugins/wordpress-https/lib/WordPressHTTPS/Module/DomainMapping.php on line 43”

    isn’t on all the pages. Main homepage, main tabs are working fine. Except when I go to the menu and scroll down and select.

    I’m not sure what’s going on.

    The website is http://www.olivias4tea.com

    You can see the error on https://olivias4tea.com/olivias-dollhouse-tea-room/

    Any help would be greatly appreciated.

    Thanks

    Thread Starter Marco Florian

    (@marcorfg)

    Go to the file and line below:

    /wp-content/plugins/wordpress-https/lib/WordPressHTTPS/Module/DomainMapping.php on line 43

    Replace:

    preg_match(‘/’ . $http_domain . ‘/’, $url, $matches);

    With:

    preg_match(‘/’ . str_replace(‘/’, ‘\/’, $http_domain) . ‘/’, $url, $matches);

    Hi Marco,

    thanks so much!

    It works.

    Thread Starter Marco Florian

    (@marcorfg)

    Glad to help. You’re welcome 🙂

    Marking it as solve.

    Thread Starter Marco Florian

    (@marcorfg)

    Well, actually, the plugin author should apply this fix. Hope he/she does. Still a great plugin! Thanks.

    Perhaps they should but I guess they didn’t ’cause I ran into the same problem (WordPress 4.0, plugin WordPress HTTPS 3.3.6) but with a ‘p’ instead of ‘c’. But it seems like the same solution as you proposed above did the trick, again 🙂
    Great stuff, thanks !

    No more Warnings 🙂

    https://norton.alterlinks.com

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Warning: preg_match(): Unknown modifier 'c' in /DomainMapping.php on line 43’ is closed to new replies.