[wp-trac] [WordPress Trac] #11698: have_posts should not auto rewind

WordPress Trac wp-trac at lists.automattic.com
Tue Mar 23 09:10:20 UTC 2010


#11698: have_posts should not auto rewind
--------------------------------------+-------------------------------------
 Reporter:  mwillberg                 |        Owner:          
     Type:  defect (bug)              |       Status:  reopened
 Priority:  normal                    |    Milestone:          
Component:  General                   |      Version:          
 Severity:  minor                     |   Resolution:          
 Keywords:  dev-feedback 2nd-opinion  |  
--------------------------------------+-------------------------------------
Changes (by purewhite):

 * cc: purewhite (added)


Comment:

 This issue affects other people who couldn't work out how to fix it. As
 stated above, if you read an EOF from a file handler, you should not then
 be able to keep reading data from the file unless you manually perform a
 rewind. Having it rewind automatically is a bug.
 For example, I wish to do something similar to making the first post
 "fancy" except I want to make the last post fancy.
 Keeping to "conventions", calling a function that "gets" information
 should not modify any information. Another modifying function should do
 that.

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


More information about the wp-trac mailing list