Skip to content

Sometime a sitemap contains more than $maxUrls URLs #81

@DarkSilence

Description

@DarkSilence

The problem lays in flush() function.

When a sitemap is truncated by size here:

if ($this->byteCount + $dataSize + $footSize > $this->maxBytes) {

finishFile() functions is called which leads to zeroing urlsCount variable, but right after that a remaining chunk is appended to a file here (with contains up to $bufferSize URLs):

$this->writerBackend->append($data);

Those URLs in that chunk aren't counted anywhere and a next sitemap overflows.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions