Make WordPress Core


Ignore:
Timestamp:
12/20/2014 10:46:53 PM (12 years ago)
Author:
wonderboymusic
Message:

For clarity, initialize some arrays that previously were only assigned via short circuit in loops.

See #30799.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/general-template.php

    r30854 r30982  
    14391439                if ( ! $results = wp_cache_get( $key, 'posts' ) ) {
    14401440                        $results = $wpdb->get_results( $query );
    1441                         $cache[ $key ] = $results;
    14421441                        wp_cache_set( $key, $results, 'posts' );
    14431442                }
    … …  
    16581657        <tr>';
    16591658
     1659        $daywithpost = array();
     1660
    16601661        // Get days with posts
    16611662        $dayswithposts = $wpdb->get_results("SELECT DISTINCT DAYOFMONTH(post_date)
    … …  
    16671668                        $daywithpost[] = $daywith[0];
    16681669                }
    1669         } else {
    1670                 $daywithpost = array();
    16711670        }
    16721671
Note: See TracChangeset for help on using the changeset viewer.