New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(Paging) Ensure page validity #5125
(Paging) Ensure page validity #5125
Conversation
~ get valid page after validation in pager
+ apply style
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems you are overriding the $page
variable in L1082 for the computation of $offset
. Can you add some tests to cover this?
+ add test function for page lower/higher than available pages
@paulbalandan something like this ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may fix CS Fixer failure
@puschie286 Please run |
Co-authored-by: Mostafa Khudair <59371810+mostafakhudair@users.noreply.github.com>
~ cs-fix
An invalid page lead to an exception when using the model paginate function.
page::store validates the page but it doesnt update the page used in the model.
So we need to read the page value again after calling pager::store in paginate