WordPress.org

Make WordPress Core

Changeset 32 in tests


Ignore:
Timestamp:
09/24/07 23:20:49 (7 years ago)
Author:
tellyworth
Message:

fix warning

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-testlib/base.php

    r16 r32  
    5353 
    5454        $all_posts = $wpdb->get_col("SELECT ID from {$wpdb->posts}"); 
    55         foreach ($all_posts as $id) 
    56             wp_delete_post($id); 
     55        if ($all_posts) { 
     56            foreach ($all_posts as $id) 
     57                wp_delete_post($id); 
     58        } 
    5759    } 
    5860 
Note: See TracChangeset for help on using the changeset viewer.