From 8b91de51c3acfdbd3c2be01d34b3cdc7be81ed6e Mon Sep 17 00:00:00 2001 From: Oleksandr Krasko <0m3r.mail@gmail.com> Date: Fri, 13 May 2022 14:55:48 +0300 Subject: [PATCH] Fix null argument to preg_split MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Deprecated Functionality: preg_split(): Passing null to parameter #3 ($limit) of type int is deprecated https://www.php.net/manual/en/function.preg-split.php#refsect1-function.preg-split-parameters limit: If specified, then only substrings up to limit are returned with the rest of the string being placed in the last substring. A limit of -1 or 0 means "no limit". Refs: - https://www.drupal.org/project/geshifilter/issues/3262325 Signed-off-by: Elan Ruusamäe --- lib/Minify/CSS/Compressor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Minify/CSS/Compressor.php b/lib/Minify/CSS/Compressor.php index 3465061..659f175 100644 --- a/lib/Minify/CSS/Compressor.php +++ b/lib/Minify/CSS/Compressor.php @@ -259,7 +259,7 @@ class Minify_CSS_Compressor { // Issue 210: must not eliminate WS between words in unquoted families $flags = PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY; - $pieces = preg_split('/(\'[^\']+\'|"[^"]+")/', $m[1], null, $flags); + $pieces = preg_split('/(\'[^\']+\'|"[^"]+")/', $m[1], -1, $flags); $out = 'font-family:'; while (null !== ($piece = array_shift($pieces))) {