Apply fixers
This commit is contained in:
parent
720ed4d379
commit
f00b3279ea
@ -35,22 +35,22 @@ while ($read || $write) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (in_array(STDOUT, $w) && strlen($out) > 0) {
|
if (in_array(STDOUT, $w) && strlen($out) > 0) {
|
||||||
$written = fwrite(STDOUT, (binary) $out, 32768);
|
$written = fwrite(STDOUT, (string) $out, 32768);
|
||||||
if (false === $written) {
|
if (false === $written) {
|
||||||
die(ERR_WRITE_FAILED);
|
die(ERR_WRITE_FAILED);
|
||||||
}
|
}
|
||||||
$out = (binary) substr($out, $written);
|
$out = (string) substr($out, $written);
|
||||||
}
|
}
|
||||||
if (null === $read && '' === $out) {
|
if (null === $read && '' === $out) {
|
||||||
$write = array_diff($write, array(STDOUT));
|
$write = array_diff($write, array(STDOUT));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (in_array(STDERR, $w) && strlen($err) > 0) {
|
if (in_array(STDERR, $w) && strlen($err) > 0) {
|
||||||
$written = fwrite(STDERR, (binary) $err, 32768);
|
$written = fwrite(STDERR, (string) $err, 32768);
|
||||||
if (false === $written) {
|
if (false === $written) {
|
||||||
die(ERR_WRITE_FAILED);
|
die(ERR_WRITE_FAILED);
|
||||||
}
|
}
|
||||||
$err = (binary) substr($err, $written);
|
$err = (string) substr($err, $written);
|
||||||
}
|
}
|
||||||
if (null === $read && '' === $err) {
|
if (null === $read && '' === $err) {
|
||||||
$write = array_diff($write, array(STDERR));
|
$write = array_diff($write, array(STDERR));
|
||||||
|
Reference in New Issue
Block a user