WordPress.org

Make WordPress Core

Changeset 8188


Ignore:
Timestamp:
06/24/08 19:58:54 (6 years ago)
Author:
markjaquith
Message:

Don't call loop_end hook if we don't have any posts. props Denis-de-Bernardy and DD32. fixes #6769 for trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/query.php

    r8185 r8188  
    15311531        if ($this->current_post + 1 < $this->post_count) { 
    15321532            return true; 
    1533         } elseif ($this->current_post + 1 == $this->post_count) { 
     1533        } elseif ($this->current_post + 1 == $this->post_count && $this->post_count > 0) { 
    15341534            do_action('loop_end'); 
    15351535            // Do some cleaning up after the loop 
Note: See TracChangeset for help on using the changeset viewer.