8000 PhpSubprocess: Add flag PREG_OFFSET_CAPTURE to preg_match to identify… · symfony/symfony@1ef6bf7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1ef6bf7

Browse files
M-arcusnicolas-grekas
authored andcommitted
PhpSubprocess: Add flag PREG_OFFSET_CAPTURE to preg_match to identify the offset
1 parent 5df912c commit 1ef6bf7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Process/PhpSubprocess.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ private function writeTmpIni(array $iniFiles, string $tmpDir): string
106106
throw new RuntimeException('Unable to read ini: '.$file);
107107
}
108108
// Check and remove directives after HOST and PATH sections
109-
if (preg_match('/^\s*\[(?:PATH|HOST)\s*=/mi', $data, $matches)) {
109+
if (preg_match('/^\s*\[(?:PATH|HOST)\s*=/mi', $data, $matches, \PREG_OFFSET_CAPTURE)) {
110110
$data = substr($data, 0, $matches[0][1]);
111111
}
112112

0 commit comments

Comments
 (0)
0