fix php5.4 problem
This commit is contained in:
parent
c2405c0bbc
commit
e3296cb744
@ -339,7 +339,12 @@ class Process
|
|||||||
foreach ($fh as $type => $fileHandle) {
|
foreach ($fh as $type => $fileHandle) {
|
||||||
fseek($fileHandle, $this->readedBytes[$type]);
|
fseek($fileHandle, $this->readedBytes[$type]);
|
||||||
$data = fread($fileHandle, 8192);
|
$data = fread($fileHandle, 8192);
|
||||||
$this->readedBytes[$type] += strlen($data);
|
if(isset($this->readedBytes)) {
|
||||||
|
$this->readedBytes[$type] += strlen($data);
|
||||||
|
} else {
|
||||||
|
$this->readedBytes[$type] = strlen($data);
|
||||||
|
}
|
||||||
|
|
||||||
if (strlen($data) > 0) {
|
if (strlen($data) > 0) {
|
||||||
call_user_func($callback, $type == 1 ? self::OUT : self::ERR, $data);
|
call_user_func($callback, $type == 1 ? self::OUT : self::ERR, $data);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user