[wp-trac] [WordPress Trac] #25132: in_array() within while(have_posts() loop causes the needle to be printed

WordPress Trac noreply at wordpress.org
Sat Aug 24 01:45:24 UTC 2013


#25132: in_array() within while(have_posts() loop causes the needle to be printed
---------------------------+----------------------
 Reporter:  WebTechGlobal  |       Owner:
     Type:  defect (bug)   |      Status:  closed
 Priority:  normal         |   Milestone:
Component:  General        |     Version:  3.6
 Severity:  normal         |  Resolution:  invalid
 Keywords:                 |
---------------------------+----------------------
Changes (by SergeyBiryukov):

 * keywords:  2nd-opinion dev-feedback =>
 * status:  new => closed
 * resolution:   => invalid
 * severity:  major => normal
 * milestone:  Awaiting Review =>


Comment:

 It's not `in_array()`, it's `the_ID()`: [source:tags/3.6/wp-includes/post-
 template.php#L11].

 Use `get_the_ID()` instead.

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


More information about the wp-trac mailing list