1
0
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:
Niklas Keller 2021-07-12 22:20:01 +02:00
parent 6b7ea38a02
commit 17b758986d

View File

@ -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) {