8000 bug #25217 [Dotenv] Changed preg_match flags from null to 0 (deekthes… · symfony/symfony@8c5eead · GitHub
[go: up one dir, main page]

Skip to content

Commit 8c5eead

Browse files
bug #25217 [Dotenv] Changed preg_match flags from null to 0 (deekthesqueak)
This PR was merged into the 3.3 branch. Discussion ---------- [Dotenv] Changed preg_match flags from null to 0 | Q | A | ------------- | --- | Branch? | 3.3 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | I came across this bug while using HHVM in PHP7 mode. The flag should be changed to match type in function signature and bring it in line with other uses of [preg_match](https://secure.php.net/manual/en/function.preg-match.php) (https://github.com/symfony/dotenv/blob/3.3/Dotenv.php#L149) Applicable to 3.3, 3.4, 4.0 Commits ------- b0d297b [Dotenv] Changed preg_match flags from null to 0
2 parents 0d433cd + b0d297b commit 8c5eead

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Component/Dotenv/Dotenv.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ private function lexVarname()
173173

174174
private function lexValue()
175175
{
176-
if (preg_match('/[ \t]*+(?:#.*)?$/Am', $this->data, $matches, null, $this->cursor)) {
176+
if (preg_match('/[ \t]*+(?:#.*)?$/Am', $this->data, $matches, 0, $this->cursor)) {
177177
$this->moveCursor($matches[0]);
178178
$this->skipEmptyLines();
179179

@@ -295,7 +295,7 @@ private function lexNestedExpression()
295295

296296
private function skipEmptyLines()
297297
{
298-
if (preg_match('/(?:\s*+(?:#[^\n]*+)?+)++/A', $this->data, $match, null, $this->cursor)) {
298+
if (preg_match('/(?:\s*+(?:#[^\n]*+)?+)++/A', $this->data, $match, 0, $this->cursor)) {
299299
$this->moveCursor($match[0]);
300300
}
301301
}

0 commit comments

Comments
 (0)
0