Home>Support>Warning: preg_replace_callback(): Compilation failed

Warning: preg_replace_callback(): Compilation failed

I have this error showing on the front end:

Warning: preg_replace_callback(): Compilation failed: invalid range in character class at offset 22 in /home/excell02/public_html/wp-content/plugins/so-widgets-bundle/base/siteorigin-widget.class.php on line 853

This is line 853:
//handle less @import statements
$less = preg_replace_callback( ‘/^@imports+”.*?/?([w-.]+)”;/m’, array( $this, ‘get_less_import_contents’ ), $less );

The link https://we.tl/t-9OHxADUZ2V

Did anyone can fix it?

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 5 years, 9 months ago Andrew Misplon
    Hi, I Work Here

    Hi, thanks for reaching out. If you roll back to PHP 7.2.x, the issue will be resolved.

    The bug fix for this 7.3 problem will be included in the next Widgets Bundle release.

    You can roll your PHP version back using most hosting control panels or by contacting your host.

  2. 5 years, 9 months ago 陳嘉慶

    Thank you very much.
    Hope you fix the bug very soon.

  3. 5 years, 9 months ago Andrew Misplon
    Hi, I Work Here

    Hi, I don’t have an exact date on the next Widgets Bundle release but it should be soon. The immediate solution would be to downgrade PHP to 7.2.x. This is often a very quick change. For example, if you’re using GoDaddy: https://za.godaddy.com/help/view-or-change-your-php-version-in-web-and-classic-hosting-3937

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More