Skip to content

Commit 7a7ce2c

Browse files
Don't use is_resource() on non-streams
1 parent e86f855 commit 7a7ce2c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Terminal.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,7 @@ private static function readFromProcess(string $command): ?string
158158

159159
$cp = \function_exists('sapi_windows_cp_set') ? sapi_windows_cp_get() : 0;
160160

161-
$process = proc_open($command, $descriptorspec, $pipes, null, null, ['suppress_errors' => true]);
162-
if (!\is_resource($process)) {
161+
if (!$process = proc_open($command, $descriptorspec, $pipes, null, null, ['suppress_errors' => true])) {
163162
return null;
164163
}
165164

0 commit comments

Comments
 (0)