Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -100,16 +100,16 @@ public function getEncryptionContext(): ?EncryptionContext {
public function getContent(Document $document): Stream {
if (($startStreamPos = $document->stream->getStartNextLineAfter(Marker::STREAM, $this->startOffset, $this->endOffset)) !== null
&& ($endStreamPos = $document->stream->lastPos(Marker::END_STREAM, $document->stream->getSizeInBytes() - $this->endOffset)) !== null) {
if ($startStreamPos === $endStreamPos) {
if ($startStreamPos === $endStreamPos
|| $startStreamPos === ($eolEndStreamPos = $document->stream->getEndOfCurrentLine($endStreamPos - 1, $this->endOffset))) {
return new InMemoryStream('');
}

return CompressedObjectContentParser::parseBinary(
$this->getEncryptionContext(),
$document,
$startStreamPos,
($document->stream->getEndOfCurrentLine($endStreamPos - 1, $this->endOffset)
?? throw new ParseFailureException(sprintf('Unable to locate marker %s', WhitespaceCharacter::LINE_FEED->value))) - $startStreamPos,
($eolEndStreamPos ?? throw new ParseFailureException(sprintf('Unable to locate marker %s', WhitespaceCharacter::LINE_FEED->value))) - $startStreamPos,
$this->getDictionary($document),
);
}
Expand Down
Loading