mirror of
https://github.com/mrclay/minify.git
synced 2025-08-21 05:11:46 +02:00
Fix null argument to preg_split
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 <glen@pld-linux.org>
This commit is contained in:
committed by
Elan Ruusamäe
parent
1c000f9d05
commit
8b91de51c3
@@ -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))) {
|
||||
|
Reference in New Issue
Block a user