Opened 11 years ago
Closed 9 years ago
#25273 closed defect (bug) (fixed)
wp_link_pages shouldn't be able to use a negative page number
Reported by: | betzster | Owned by: | wonderboymusic |
---|---|---|---|
Milestone: | 4.4 | Priority: | normal |
Severity: | trivial | Version: | 0.71 |
Component: | Posts, Post Types | Keywords: | has-patch |
Focuses: | template | Cc: |
Description
Even though the page number shouldn't be able to get to negative anyway, it would still be good to check and not allow the previous link to go to -1.
Attachments (1)
Change History (8)
#3
follow-up:
↓ 4
@
11 years ago
- Keywords 2nd-opinion has-patch added
- Severity changed from normal to trivial
- Version set to trunk
#4
in reply to:
↑ 3
@
11 years ago
Replying to jessepollak:
The only situation where this is an issue is when the $page ID <= 0, which I'm not sure ever really happens.
I saw this on a live site, though I don't remember the details anymore.
Note: See
TracTickets for help on using
tickets.
Thanks for the bug report betzser, sorry it didn't get a faster response!
This issue is still around in trunk revision 27076.
To recreate the issue, run inside of The Loop:
This creates "Previous page" links where the link goes to a page with the index -1.
The only situation where this is an issue is when the $page ID <= 0, which I'm not sure ever really happens. That said, it's a tiny fix, so it may be worth just merging in because why not.
I'll defer to the core team to decide whether the existing patch should be accepted.
Thanks again for the report betzster!