retry last page just in case

This commit is contained in:
Robin Appelman 2017-06-16 17:31:07 +02:00
commit 144d03e1e2

View file

@ -13,8 +13,8 @@ $statePath = getenv('STATE_FILE');
if (file_exists($statePath)) { if (file_exists($statePath)) {
$lastPage = intval(file_get_contents($statePath)); $lastPage = intval(file_get_contents($statePath)) - 1;
if (!$lastPage) { if ($lastPage < 1) {
$lastPage = 1; $lastPage = 1;
} }
} else { } else {