Problem/Motivation

If an error occurs during the preg_replace() function a WSOD may occur. This seems to be especially true for pages with a lot of HTML. I ran into a PREG_JIT_STACKLIMIT_ERROR error code (failure due to limited JIT stack space) under those conditions.

Proposed resolution

Check for an error before setting the minified HTML since un-minified HTML is better than no HTML at all.

Comments

Daniel Korte created an issue. See original summary.

daniel korte’s picture

Assigned: daniel korte » Unassigned
Status: Active » Needs review
StatusFileSize
new689 bytes
wim leers’s picture

Priority: Normal » Major
Status: Needs review » Reviewed & tested by the community

LGTM!

daniel korte’s picture

Thanks, Wim!

  • slydevil committed 428aab5 on 8.x-1.x authored by Daniel Korte
    Issue #3000443 by Daniel Korte: Only use minified HTML if there was not...
slydevil’s picture

Status: Reviewed & tested by the community » Fixed
slydevil’s picture

Status: Fixed » Closed (fixed)