From 64259528af866aa54c0517d6de8e4fb36df82b54 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 9 Jun 2023 21:34:01 +0200 Subject: [PATCH] removed outdated version check --- inc/common.php | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/inc/common.php b/inc/common.php index 72e9522a6..dacd0849e 100644 --- a/inc/common.php +++ b/inc/common.php @@ -743,17 +743,10 @@ function checkwordblock($text = '') { // phpcs:enable $wordblocks = getWordblocks(); - // how many lines to read at once (to work around some PCRE limits) - if(version_compare(phpversion(), '4.3.0', '<')) { - // old versions of PCRE define a maximum of parenthesises even if no - // backreferences are used - the maximum is 99 - // this is very bad performancewise and may even be too high still - $chunksize = 40; - } else { - // read file in chunks of 200 - this should work around the - // MAX_PATTERN_SIZE in modern PCRE - $chunksize = 200; - } + // read file in chunks of 200 - this should work around the + // MAX_PATTERN_SIZE in modern PCRE + $chunksize = 200; + while($blocks = array_splice($wordblocks, 0, $chunksize)) { $re = array(); // build regexp from blocks -- 2.11.4.GIT