Make WordPress Core


Ignore:
Timestamp:
12/20/2014 10:46:53 PM (10 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-admin/includes/template.php

    r30890 r30982  
    302302    $default = 1;
    303303
     304    $checked_categories = array();
     305
    304306    if ( $link_id ) {
    305307        $checked_categories = wp_get_link_cats( $link_id );
    306308        // No selected categories, strange
    307         if ( ! count( $checked_categories ) )
     309        if ( ! count( $checked_categories ) ) {
    308310            $checked_categories[] = $default;
     311        }
    309312    } else {
    310313        $checked_categories[] = $default;
Note: See TracChangeset for help on using the changeset viewer.