Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit fed4e33

Browse filesBrowse files
committed
PhpSubprocess: Add flag PREG_OFFSET_CAPTURE to preg_match to identify the offset
1 parent 15158aa commit fed4e33
Copy full SHA for fed4e33

File tree

1 file changed

+1
-1
lines changed
Filter options

1 file changed

+1
-1
lines changed

‎src/Symfony/Component/Process/PhpSubprocess.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Process/PhpSubprocess.php
+1-1Lines changed: 1 addition & 1 deletion
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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.