diff --git a/src/lib/parquet/src/Flow/Parquet/BinaryReader/BinaryBufferReader.php b/src/lib/parquet/src/Flow/Parquet/BinaryReader/BinaryBufferReader.php index b9c3ea78b..d4897e594 100644 --- a/src/lib/parquet/src/Flow/Parquet/BinaryReader/BinaryBufferReader.php +++ b/src/lib/parquet/src/Flow/Parquet/BinaryReader/BinaryBufferReader.php @@ -300,7 +300,13 @@ public function readVarInt() : int $shift = 0; do { - $byte = $this->readBytes(1)->toArray()[0]; + $bytes = $this->readBytes(1); + + if ($bytes->count() === 0) { + break; + } + + $byte = $bytes->toArray()[0]; $result |= ($byte & 0x7F) << $shift; $shift += 7; } while ($byte >= 0x80);