• Hi,
    The plugin is giving this error:

    [Sun Sep 08 08:44:40.930037 2019] [proxy_fcgi:error] [pid 29158] [client 127.0.0.1:xxxxx] AH01071: Got error 'PHP message: PHP Warning:  preg_match_all(): Compilation failed: invalid range in character class at offset 15 in /home/xxxx.xxxxxx.com/xxxxxx/public_html/wp-content/plugins/mts-url-shortener/public/class-url-shortener-public.php on line 379PHP message: PHP Warning:  preg_match_all(): Compilation failed: invalid range in character class at offset 15 in /home/xxxx.xxxxxx.com/xxxxxx/public_html/wp-content/plugins/mts-url-shortener/public/class-url-shortener-public.php on line 379PHP message: PHP Warning:  preg_match_all(): Compilation failed: invalid range in character class at offset 15 in /home/xxxx.xxxxxx.com/xxxxxx/public_html/wp-content/plugins/mts-url-shortener/public/class-url-shortener-public.php on line 379PHP message: PHP Warning:  preg_match_all(): Compilation failed: invalid range in character class at offset 15 in /home/xxxx.xxxxxx.com/xxxxxx/public_html/wp-content/plugins/mts-url-shortener/public/class-url-shortener-public.php on line 379PHP message: PHP Warning:  preg_match_all(): Compilation failed: invalid range in character class at offset 15 in /home/xxxx.xxxxxx.com/xxxxxx/public_html/wp-content/plugins/mts-url-shortener/public/class-url-shortener-public.php on line 379PHP message: PHP Warning:  preg_match_all(): Compilation failed: invalid range in character class at offset 15 in /home/xxxx.xxxxxx.com/xxxxxx/public_html/wp-content/plugins/mts-url-shortener/public/class-url-shortener-public.php on line 379PHP message: PHP Warning:  preg_match_all(): Compilation failed: invalid range in character class at offset 15 in /home/xxxx.xxxxxx.com/xxxxxx/public_html/wp-content/plugins/mts-url-shortener/public/class-url-shortener-public.php on line 379PHP message: PHP Warning:  preg_match_all(): Compilation failed: invalid range in character class at offset 15 in /home/xxxx.xxxxxx.com/xxxxxx/public_html/wp-content/plugins/mts-url-shortener/public/class-url-shortener-public.php on line 379PHP message: PHP Warning:  preg_match_all(): Compilation failed: invalid range in character class at offset 15 in /home/xxxx.xxxxxx.com/xxxxxx/public_html/wp-content/plugins/mts-url-shortener/public/class-url-shortener-public.php on line 379'
    

    What’s causing this, and how can we fix it?
    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Since the author hasn’t replied or address this, here’s the fix…

    Basically in PHP 7.3 it’s using a more strict engine to process regular expressions. In this case, the hyphens need escaped on line 379 (escape means add a backslash before the hyphen, there are 2 in this line)

    Change This:

    if ( ! preg_match_all('/( [\\w_-]+ |([\\w-_]+)\s*=\\s*("[^"]*"|\'[^\']*\'|[^"\'\\s>]*))/', $tag, $matches, PREG_SET_ORDER) )

    To This:

    if ( ! preg_match_all('/( [\\w_\-]+ |([\\w\-_]+)\s*=\\s*("[^"]*"|\'[^\']*\'|[^"\'\\s>]*))/', $tag, $matches, PREG_SET_ORDER) )

    Many thanks to forwardtrends – it was easy to fix! Harald

    Forwardtrends thank you very much, replaced the line in the file and it worked??

    @mythemeshop are you guys going to fix this warning? Thx for this great plugin btw ?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘PHP Warning preg_match_all(): Compilation failed’ is closed to new replies.