[wp-trac] [WordPress Trac] #22061: If $this->posts is empty, don't do stuff to it
    WordPress Trac 
    wp-trac at lists.automattic.com
       
    Mon Oct  1 00:47:04 UTC 2012
    
    
  
#22061: If $this->posts is empty, don't do stuff to it
----------------------------+------------------
 Reporter:  wonderboymusic  |       Owner:
     Type:  defect (bug)    |      Status:  new
 Priority:  normal          |   Milestone:  3.5
Component:  Query           |     Version:  2.9
 Severity:  normal          |  Resolution:
 Keywords:  has-patch       |
----------------------------+------------------
Comment (by dd32):
 Makes sense, but, iterating over an empty array doesn't cause that notice,
 no notice will be given for an empty array.  That type of notice will be
 issued if you pass a non-array/non-iterable value to foreach - for
 example, `false`.
-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/22061#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
    
    
More information about the wp-trac
mailing list