Skip to content

Commit 6e0026e

Browse files
Fix wrong boolean values
1 parent 8eb6dc5 commit 6e0026e

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Pipes/AbstractPipes.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,10 @@ protected function unblock(): void
7272
}
7373

7474
foreach ($this->pipes as $pipe) {
75-
stream_set_blocking($pipe, 0);
75+
stream_set_blocking($pipe, false);
7676
}
7777
if (\is_resource($this->input)) {
78-
stream_set_blocking($this->input, 0);
78+
stream_set_blocking($this->input, false);
7979
}
8080

8181
$this->blocked = false;
@@ -97,7 +97,7 @@ protected function write(): ?array
9797
if (!$input->valid()) {
9898
$input = null;
9999
} elseif (\is_resource($input = $input->current())) {
100-
stream_set_blocking($input, 0);
100+
stream_set_blocking($input, false);
101101
} elseif (!isset($this->inputBuffer[0])) {
102102
if (!\is_string($input)) {
103103
if (!\is_scalar($input)) {

Tests/PipeStdinInStdoutStdErrStreamSelect.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
$read = [\STDIN];
1818
$write = [\STDOUT, \STDERR];
1919

20-
stream_set_blocking(\STDIN, 0);
21-
stream_set_blocking(\STDOUT, 0);
22-
stream_set_blocking(\STDERR, 0);
20+
stream_set_blocking(\STDIN, false);
21+
stream_set_blocking(\STDOUT, false);
22+
stream_set_blocking(\STDERR, false);
2323

2424
$out = $err = '';
2525
while ($read || $write) {

0 commit comments

Comments
 (0)