You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit e043369
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: src/Application/WpCliRunner.php
+24-1Lines changed: 24 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,7 @@ public function run(array $arguments, OutputInterface $output): int
28
28
29
29
$pipes = [];
30
30
31
+
// phpcs:ignore Generic.PHP.ForbiddenFunctions.Found, WordPress.PHP.DiscouragedPHPFunctions.system_calls_proc_open -- Native WP-CLI argv bypasses the shell at this single reviewed CLI process boundary.
31
32
$process = proc_open(
32
33
$command,
33
34
[
@@ -44,6 +45,7 @@ public function run(array $arguments, OutputInterface $output): int
44
45
return Command::FAILURE;
45
46
}
46
47
48
+
// phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_fclose -- Close private subprocess stdin, not a WordPress file.
47
49
fclose($pipes[0]);
48
50
stream_set_blocking($pipes[1], false);
49
51
stream_set_blocking($pipes[2], false);
@@ -54,7 +56,9 @@ public function run(array $arguments, OutputInterface $output): int
54
56
usleep(10000);
55
57
}
56
58
59
+
// phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_fclose -- Close private subprocess stdout, not a WordPress file.
57
60
fclose($pipes[1]);
61
+
// phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_fclose -- Close private subprocess stderr, not a WordPress file.
58
62
fclose($pipes[2]);
59
63
60
64
$exitCode = proc_close($process);
@@ -108,14 +112,33 @@ private function environment(): array
0 commit comments