mirror of
https://github.com/danog/file.git
synced 2025-01-22 13:21:13 +01:00
Fix deprecation warning on PHP 8.1
This commit is contained in:
parent
6b7ea38a02
commit
17b758986d
@ -141,7 +141,10 @@ final class ParallelFile implements File
|
||||
|
||||
try {
|
||||
$data = yield $this->worker->enqueue(new Internal\FileTask('fread', [$length], $this->id));
|
||||
|
||||
if ($data !== null) {
|
||||
$this->position += \strlen($data);
|
||||
}
|
||||
} catch (TaskException $exception) {
|
||||
throw new StreamException("Reading from the file failed", 0, $exception);
|
||||
} catch (WorkerException $exception) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user