Describe the bug
The current pagination, instead of returning an error page when trying to visit a page number that doesn't exist (for example visiting page:50 in a collection that has only 10 pages) it's returning the last page of the pagination.
To Reproduce
Steps to reproduce the behavior:
- In the starterkit homepage template, add a
paginate() in the foreach loop. For example foreach (page('photography')->children()->listed()->paginate(2)
- Try open a page with a stupidly high page number
Expected behavior
You should be redirected to the error page.
Screenshots

Kirby Version
This is happening in the current 3.2.0 but @texnixe has tested this and told me it goes back to 3.1.0