Skip to content

Page number int casting #1871

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

Merged
merged 2 commits into from
Apr 18, 2018
Merged

Page number int casting #1871

merged 2 commits into from
Apr 18, 2018

Conversation

IonBazan
Copy link
Contributor

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #1860
License MIT
Doc PR no

This PR adds casting page[page] parameter to int and page number validation. It throws an error when page number is less than 1 and tries to convert a string to int when possible.

@meyerbaptiste
Copy link
Member

Can you change the base branch? Bugfixes should target the 2.2 branch.

@IonBazan
Copy link
Contributor Author

@meyerbaptiste done 😃

@teohhanhui
Copy link
Contributor

teohhanhui commented Apr 16, 2018

Is it a problem with the rebase because I see some "totalCount" stuff which is not related to this bug?

Edit: Yeah, you screwed up the rebase... 😆

@teohhanhui
Copy link
Contributor

Something like this should do it:

git reset --hard upstream/2.2
git cherry-pick 25c831e

@IonBazan
Copy link
Contributor Author

@teohhanhui I merged master and then changed PR base to 2.2. I've removed commits from the merge and now it's all ok.

@soyuka soyuka merged commit b2339c3 into api-platform:2.2 Apr 18, 2018
@soyuka
Copy link
Member

soyuka commented Apr 18, 2018

thanks @IonBazan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants