Skip to content

Commit 11eb9fb

Browse files
committed
Debug travis failure
1 parent 7783ed9 commit 11eb9fb

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

ext/standard/tests/file/bug60120.phpt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,18 +61,19 @@ while ($pipes || $writePipes) {
6161
foreach ($r as $pipe) {
6262
$type = array_search($pipe, $pipes);
6363
$data = fread($pipe, 8192);
64-
if (false === $data || feof($pipe)) {
64+
if (feof($pipe)) {
6565
fclose($pipe);
6666
unset($pipes[$type]);
67+
} elseif (false === $data) {
68+
die('Failed to read from pipe');
6769
} else {
68-
$resourceId = get_resource_id($pipe);
69-
$procOutput[$resourceId] = ($procOutput[$resourceId] ?? '') . $data;
70+
$procOutput[$type] = ($procOutput[$type] ?? '') . $data;
7071
}
7172
}
7273
}
7374
foreach ($procOutput as $output) {
7475
if ($output !== $stdin) {
75-
die('Output does not match input');
76+
die('Output does not match input: ' . $output);
7677
}
7778
}
7879
echo "OK.";

0 commit comments

Comments
 (0)