Advice needed for error

good morning

i’m getting an error on the main instance of our C5 site, it says:

preg_match(): Compilation failed: invalid range in character class at offset 4

i’ve checked the logs and the error is listed with a longer error:

9 Jun 2022, 11:05:16 Exceptions admin Exception Occurred:
/home/xxxxxxxx/ua.xxxxxxxx.se/updates/concrete5-8.4.4/concrete/vendor/sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/simple_html_dom.php
:1378 preg_match(): Compilation failed: invalid range in character class at offset 4 (2)

i’m not sure how to resolve this, so any advice would be awesome.

thanks
:slight_smile:

@sbutterworth
This is probably due to an upgrade of the server php.
Line 1378 of that file looks like this

if (!preg_match("/^[\w-:]+$/", $tag)) { 

Try changing it to this

if (!preg_match("/^[\w\-:]+$/", $tag)) {

(The hyphen has been escaped with a back slash).

Did @ConcreteOwl 's solution do the trick for you, @sbutterworth ? If so if you can mark it as solution that’s a big help for us. Thanks!