Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter gonandriy

    (@gonandriy)

    Hi, luciamarinescu
    After a hours of debugging I have found out that error was in
    tubalmartin\CssMin\Minifier
    The following code fails

    // Process strings so their content doesn't get accidentally minified
            $css = preg_replace_callback(
                '/(?:"(?:[^\\\\"]|\\\\.|\\\\)*")|'."(?:'(?:[^\\\\']|\\\\.|\\\\)*')/S",
                array($this, 'processStringsCallback'),
                $css
            );

    with error PREG_JIT_STACKLIMIT_ERROR
    and $css variable value is reset to null as result.
    When I disable pcre.jit in php.ini the problem of course disappears.
    I agree that the issue is hard to reproduce, as it depends on the page content.
    In most cases the stack allocated by JIT is enough.
    If you can tweak the pattern, or report the issue to CSSMinifier developers that would be great.

    Best Regards,
    Andrew

Viewing 1 replies (of 1 total)