Make WordPress Core

Changeset 9481


Ignore:
Timestamp:
11/02/2008 11:52:49 PM (17 years ago)
Author:
ryan
Message:

Warning fixes

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-link-categories.php

    r9363 r9481  
    182182
    183183<?php if ( current_user_can('manage_categories') ) {
    184     do_action('add_link_category_form_pre', $category); ?>
     184    $category = (object) array(); $category->parent = 0; do_action('add_link_category_form_pre', $category); ?>
    185185
    186186<div class="form-wrap">
  • trunk/wp-admin/includes/taxonomy.php

    r9053 r9481  
    110110function wp_insert_category($catarr, $wp_error = false) {
    111111    $cat_defaults = array('cat_ID' => 0, 'cat_name' => '', 'category_description' => '', 'category_nicename' => '', 'category_parent' => '');
    112     $cat_arr = wp_parse_args($cat_arr, $cat_defaults);
     112    $catarr = wp_parse_args($catarr, $cat_defaults);
    113113    extract($catarr, EXTR_SKIP);
    114114
     
    168168    $cat_ID = (int) $catarr['cat_ID'];
    169169
    170     if ( $cat_ID == $catarr['category_parent'] )
     170    if ( isset($catarr['category_parent']) && ($cat_ID == $catarr['category_parent']) )
    171171        return false;
    172172
  • trunk/wp-includes/taxonomy.php

    r9397 r9481  
    328328        return $_term;
    329329    } elseif ( $output == ARRAY_A ) {
    330         return get_object_vars($_term);
     330        $__term = get_object_vars($_term);
     331        return $__term;
    331332    } elseif ( $output == ARRAY_N ) {
    332         return array_values(get_object_vars($_term));
     333        $__term = array_values(get_object_vars($_term));
     334        return $__term;
    333335    } else {
    334336        return $_term;
Note: See TracChangeset for help on using the changeset viewer.