[wp-trac] [WordPress Trac] #24674: WP_Query::is_page() should use stricter comparison

WordPress Trac noreply at wordpress.org
Mon Aug 12 01:52:11 UTC 2013


#24674: WP_Query::is_page() should use stricter comparison
----------------------------------------+------------------
 Reporter:  clifgriffin                 |       Owner:
     Type:  defect (bug)                |      Status:  new
 Priority:  normal                      |   Milestone:  3.7
Component:  Query                       |     Version:  2.5
 Severity:  minor                       |  Resolution:
 Keywords:  needs-unit-tests has-patch  |
----------------------------------------+------------------

Comment (by clifgriffin):

 I didn't imply it was a mandatory feature.  It's simply true that
 WordPress will be used in ways that aren't completely expected, and quirks
 like this will matter more.

 That really isn't the issue though. The virtual page scenario is simply an
 example from a plugin with thousands of users.

 The fact that `is_page(0)` returns true is a flaw, no matter the
 circumstance.  It should always return false unless the page ID is
 literally 0, however unlikely.

 Unless there is a legitimate reason it ''should'' return true or a
 scenario can be discovered where returning false could disrupt other
 configurations, I don't see the point in not patching it.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/24674#comment:11>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list