Skip to content
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

Bug: Move work with $_GET['page'] from Model to Pager #2467

Closed
MashinaMashina opened this issue Dec 28, 2019 · 3 comments
Closed

Bug: Move work with $_GET['page'] from Model to Pager #2467

MashinaMashina opened this issue Dec 28, 2019 · 3 comments
Labels
bug Verified issues on the current code behavior or pull requests that will fix them

Comments

@MashinaMashina
Copy link
Contributor

MashinaMashina commented Dec 28, 2019

required move from Model::paginate() line
$page = $page >= 1 ? $page : (ctype_digit($_GET['page'] ?? '') && $_GET['page'] > 1 ? $_GET['page'] : 1); to Pager, because it pager business logic.
To Model::paginate() we must use $pager->getCurrentPage()

@MashinaMashina MashinaMashina added the bug Verified issues on the current code behavior or pull requests that will fix them label Dec 28, 2019
@MashinaMashina MashinaMashina changed the title Bug: getCurrentPage try to return string, but must return int Bug: Pager::getCurrentPage() try to return string, but must return int Dec 28, 2019
@MashinaMashina
Copy link
Contributor Author

I will try to create PR

@MashinaMashina
Copy link
Contributor Author

MashinaMashina commented Dec 28, 2019

Fix: #2468

@MashinaMashina MashinaMashina changed the title Bug: Pager::getCurrentPage() try to return string, but must return int Bug: Move work with $_GET['page'] from Model to Pager Dec 28, 2019
@MashinaMashina
Copy link
Contributor Author

Already fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Verified issues on the current code behavior or pull requests that will fix them
Projects
None yet
Development

No branches or pull requests

1 participant