From 771d21c345c7be021514ffb5b6c439b500ece42d Mon Sep 17 00:00:00 2001 From: Rainer Kraft Date: Tue, 6 Dec 2022 17:25:01 +0000 Subject: [PATCH] Update deprecated use of `preg_match*()` flags --- lessc.inc.php | 6 +++--- lessify.inc.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lessc.inc.php b/lessc.inc.php index 92a3c912..cfa0b8f7 100644 --- a/lessc.inc.php +++ b/lessc.inc.php @@ -3605,7 +3605,7 @@ protected function match($regex, &$out, $eatWhitespace = null) { if ($eatWhitespace === null) $eatWhitespace = $this->eatWhiteDefault; $r = '/'.$regex.($eatWhitespace && !$this->writeComments ? '\s*' : '').'/Ais'; - if (preg_match($r, $this->buffer, $out, null, $this->count)) { + if (preg_match($r, $this->buffer, $out, 0, $this->count)) { $this->count += strlen($out[0]); if ($eatWhitespace && $this->writeComments) $this->whitespace(); return true; @@ -3617,7 +3617,7 @@ protected function match($regex, &$out, $eatWhitespace = null) { protected function whitespace() { if ($this->writeComments) { $gotWhite = false; - while (preg_match(self::$whitePattern, $this->buffer, $m, null, $this->count)) { + while (preg_match(self::$whitePattern, $this->buffer, $m, 0, $this->count)) { if (isset($m[1]) && empty($this->seenComments[$this->count])) { $this->append(array("comment", $m[1])); $this->seenComments[$this->count] = true; @@ -3636,7 +3636,7 @@ protected function whitespace() { protected function peek($regex, &$out = null, $from=null) { if (is_null($from)) $from = $this->count; $r = '/'.$regex.'/Ais'; - $result = preg_match($r, $this->buffer, $out, null, $from); + $result = preg_match($r, $this->buffer, $out, 0, $from); return $result; } diff --git a/lessify.inc.php b/lessify.inc.php index c47301ad..20f41c2e 100644 --- a/lessify.inc.php +++ b/lessify.inc.php @@ -43,7 +43,7 @@ public function preg_quote($what) { public function match($regex, &$out, $eatWhitespace = true) { $r = '/'.$regex.($eatWhitespace ? '\s*' : '').'/Ais'; - if (preg_match($r, $this->buffer, $out, null, $this->count)) { + if (preg_match($r, $this->buffer, $out, 0, $this->count)) { $this->count += strlen($out[0]); return true; }