Make WordPress Core


Ignore:
Timestamp:
08/06/2008 08:31:54 PM (16 years ago)
Author:
markjaquith
Message:

Cast to array when using foreach(). Props santosj (and thanks for your perseverance!). fixes #2784

File:
1 edited

Legend:

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

    r8569 r8572  
    88    // TODO: consult hierarchy
    99    $cat_ids = get_all_category_ids();
    10     foreach ( $cat_ids as $cat_id ) {
     10    foreach ( (array) $cat_ids as $cat_id ) {
    1111        if ( $cat_id == $id )
    1212            continue;
     
    8585        $categories = array();
    8686
    87     foreach(array_keys($categories) as $key) {
     87    foreach( (array) array_keys($categories) as $key) {
    8888        _make_cat_compat($categories[$key]);
    8989    }
Note: See TracChangeset for help on using the changeset viewer.