Roman Paulov
Roman Paulov
That's my implementation for a fix for issues #82 and #81 I'm not quite sure about my approach on line 202. Could you check it please.
The problem lays in [flush()](https://github.com/samdark/sitemap/blob/a7ba091766afeb5fad1ea3056b30f26c3a620962/Sitemap.php#L221) function. When a sitemap is truncated by size here: https://github.com/samdark/sitemap/blob/a7ba091766afeb5fad1ea3056b30f26c3a620962/Sitemap.php#L232 finishFile() functions is called which leads to [zeroing urlsCount variable](https://github.com/samdark/sitemap/blob/a7ba091766afeb5fad1ea3056b30f26c3a620962/Sitemap.php#L197), but right after that a...
Since self::flush [accepts an int as a parameter](https://github.com/samdark/sitemap/blob/a7ba091766afeb5fad1ea3056b30f26c3a620962/Sitemap.php#L218) but a bool is provided here: https://github.com/samdark/sitemap/blob/a7ba091766afeb5fad1ea3056b30f26c3a620962/Sitemap.php#L184 It seems that it's a typo of some kind. Probably `$this->flush(0);` should be there.