[wp-trac] [WordPress Trac] #28401: Redundant condition in WP_Query::get_posts()
WordPress Trac
noreply at wordpress.org
Sat Jun 28 11:24:32 UTC 2014
#28401: Redundant condition in WP_Query::get_posts()
----------------------------+------------------
Reporter: SergeyBiryukov | Owner:
Type: defect (bug) | Status: new
Priority: low | Milestone: 4.0
Component: Query | Version: 2.2
Severity: minor | Resolution:
Keywords: has-patch | Focuses:
----------------------------+------------------
Changes (by engelen):
* keywords: needs-patch => has-patch
Comment:
(''get-posts-redundant-condition.28401.diff'': forgot to commit syntax
change before diffing, ''get-posts-redundant-condition.28401-2.diff'' is
the right diff)
I agree, this is a redundant check. `is_archive` and `is_search` can only
be true if `is_singular` is false. Checking for `! is_singular` is enough.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/28401#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list