[wp-trac] [WordPress Trac] #24142: Zero value for posts_per_page value in wp_query custom instance and for 'Blog pages show at most' option
WordPress Trac
noreply at wordpress.org
Tue Jul 4 06:52:14 UTC 2023
#24142: Zero value for posts_per_page value in wp_query custom instance and for
'Blog pages show at most' option
-------------------------------------------------+-------------------------
Reporter: alexvorn2 | Owner:
| SergeyBiryukov
Type: defect (bug) | Status: reviewing
Priority: normal | Milestone: 6.4
Component: Query | Version:
Severity: normal | Resolution:
Keywords: needs-testing early needs-testing- | Focuses:
info has-patch |
-------------------------------------------------+-------------------------
Changes (by oglekler):
* milestone: 6.3 => 6.4
Comment:
If in the result $limit is equal to {{{LIMIT 0, 0}}} there is no point to
make a request to the DB at all. If it weren't for limit filters, it would
be good to make $this->posts = array() and exit the method straight away
at the moment when posts_per_page is equal to zero.
Due to lack of final decision and activity lately, I am moving this ticket
to the 6.4 milestone.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/24142#comment:25>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list