RegEx error in cookiebot_addons_manipulate_script
-
The RegEx within addons/lib/helper.php seems to encounter an error when parsing scripts echo’ed via wp_head action.
I’ve called preg_last_error() when $updated_scripts returns NULL, which returns PREG_JIT_STACKLIMIT_ERROR. I’ve sprinkled the function with some debug logging, which I’m happy to share:
https://gist.github.com/valentinbora/09a2254f362e54096bb1c035c7454728
Cookiebot version: 2.0.3
Wordpress: 4.9.8
PHP 7.2.9P.S. For now, I’ve applied somewhat of a bandaid at the end of the function:
if ($updated_scripts === null) { $updated_scripts = $buffer; } return $updated_scripts;
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘RegEx error in cookiebot_addons_manipulate_script’ is closed to new replies.