From 144fb5e0a0a552eeff9a5fb59c08c0927a187655 Mon Sep 17 00:00:00 2001 From: Tony Levi Date: Fri, 11 Dec 2015 08:27:26 +0800 Subject: [PATCH] MDL-52475 core: workaround PHP7 bug #70110 with preg_match --- lib/setup.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/setup.php b/lib/setup.php index 3175bb1cc3a..a1324f00529 100644 --- a/lib/setup.php +++ b/lib/setup.php @@ -709,6 +709,11 @@ ini_set('arg_separator.output', '&'); // Work around for a PHP bug see MDL-11237 ini_set('pcre.backtrack_limit', 20971520); // 20 MB +// Work around for PHP7 bug #70110. See MDL-52475 . +if (ini_get('pcre.jit')) { + ini_set('pcre.jit', 0); +} + // Set PHP default timezone to server timezone. core_date::set_default_server_timezone();