WordPress.org

Make WordPress Core


Ignore:
Timestamp:
08/06/2008 08:31:54 PM (13 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.php

    r8090 r8572  
    4444    if ( 'link' == $args['type'] )
    4545        $taxonomy = 'link_category';
    46     $categories = get_terms($taxonomy, $args);
     46    $categories = (array) get_terms($taxonomy, $args);
    4747
    4848    foreach ( array_keys($categories) as $k )
Note: See TracChangeset for help on using the changeset viewer.