diff --git a/wp-admin/categories.php b/wp-admin/categories.php index 208fe26a64..d38cd0c1ff 100644 --- a/wp-admin/categories.php +++ b/wp-admin/categories.php @@ -13,7 +13,7 @@ $title = __('Categories'); wp_reset_vars(array('action', 'cat')); -if ( $_GET['action'] == 'delete' && isset($_GET['delete']) ) +if ( isset( $_GET['action'] ) && $_GET['action'] == 'delete' && isset($_GET['delete']) ) $action = 'bulk-delete'; switch($action) { @@ -154,10 +154,10 @@ endif; ?>
name ) ) + $category->name = ''; + + if ( ! isset( $category->slug ) ) + $category->slug = ''; + + if ( ! isset( $category->parent ) ) + $category->parent = ''; + + if ( ! isset( $category->description ) ) + $category->description = ''; +} + +_fill_empty_category($category); ?>
diff --git a/wp-admin/edit-form-advanced.php b/wp-admin/edit-form-advanced.php index 3da40273ad..85ecc3edee 100644 --- a/wp-admin/edit-form-advanced.php +++ b/wp-admin/edit-form-advanced.php @@ -369,7 +369,7 @@ function post_password_meta_box($post) {

-

+

name ) ) + $category->name = ''; + + if ( ! isset( $category->slug ) ) + $category->slug = ''; + + if ( ! isset( $category->description ) ) + $category->description = ''; +} + +_fill_empty_link_category($category); ?>
diff --git a/wp-admin/edit-tag-form.php b/wp-admin/edit-tag-form.php index 909c3a7930..c76f1b8309 100644 --- a/wp-admin/edit-tag-form.php +++ b/wp-admin/edit-tag-form.php @@ -36,12 +36,12 @@ if ( ! empty($tag_ID) ) { - -
+

+

diff --git a/wp-admin/edit-tags.php b/wp-admin/edit-tags.php index a5c2b309b2..1c56384c70 100644 --- a/wp-admin/edit-tags.php +++ b/wp-admin/edit-tags.php @@ -13,7 +13,7 @@ $title = __('Tags'); wp_reset_vars(array('action', 'tag')); -if ( $_GET['action'] == 'delete' && isset($_GET['delete_tags']) ) +if ( isset( $_GET['action'] ) && $_GET['action'] == 'delete' && isset($_GET['delete_tags']) ) $action = 'bulk-delete'; switch($action) { @@ -161,10 +161,10 @@ endif; ?>
diff --git a/wp-admin/includes/user.php b/wp-admin/includes/user.php index 8a89ac8483..4400008d55 100644 --- a/wp-admin/includes/user.php +++ b/wp-admin/includes/user.php @@ -230,10 +230,10 @@ function get_user_to_edit( $user_id ) { $user->last_name = attribute_escape($user->last_name); $user->display_name = attribute_escape($user->display_name); $user->nickname = attribute_escape($user->nickname); - $user->aim = attribute_escape($user->aim); - $user->yim = attribute_escape($user->yim); - $user->jabber = attribute_escape($user->jabber); - $user->description = wp_specialchars($user->description); + $user->aim = isset( $user->aim ) && !empty( $user->aim ) ? attribute_escape($user->aim) : ''; + $user->yim = isset( $user->yim ) && !empty( $user->yim ) ? attribute_escape($user->yim) : ''; + $user->jabber = isset( $user->jabber ) && !empty( $user->jabber ) ? attribute_escape($user->jabber) : ''; + $user->description = isset( $user->description ) && !empty( $user->description ) ? wp_specialchars($user->description) : ''; return $user; } diff --git a/wp-admin/includes/widgets.php b/wp-admin/includes/widgets.php index f7dc77f97c..2797ae5c7c 100644 --- a/wp-admin/includes/widgets.php +++ b/wp-admin/includes/widgets.php @@ -59,9 +59,11 @@ function wp_list_widgets( $show = 'all', $_search = false ) { if ( ( 'unused' == $show && $sidebar ) || ( 'used' == $show && !$sidebar ) ) continue; + if ( ! isset( $widget['params'][0] ) ) + $widget['params'][0] = array(); ob_start(); - $args = wp_list_widget_controls_dynamic_sidebar( array( 0 => array( 'widget_id' => $widget['id'], 'widget_name' => $widget['name'], '_display' => 'template', '_show' => $show ), 1 => $widget['params'][0] ) ); - $sidebar_args = call_user_func_array( 'wp_widget_control', $args ); + $args = wp_list_widget_controls_dynamic_sidebar( array( 0 => array( 'widget_id' => $widget['id'], 'widget_name' => $widget['name'], '_display' => 'template', '_show' => $show ), 1 => $widget['params'][0] ) ); + $sidebar_args = call_user_func_array( 'wp_widget_control', $args ); $widget_control_template = ob_get_contents(); ob_end_clean(); @@ -230,6 +232,13 @@ function wp_widget_control( $sidebar_args ) { $edit = -1 < $edit_widget && is_numeric($key) && $edit_widget === $key; // (bool) are we currently editing this widget $id_format = $widget['id']; + + if ( ! isset( $sidebar_args['_show'] ) ) + $sidebar_args['_show'] = ''; + + if ( ! isset( $sidebar_args['_display'] ) ) + $sidebar_args['_display'] = ''; + // We aren't showing a widget control, we're outputing a template for a mult-widget control if ( 'all' == $sidebar_args['_show'] && 'template' == $sidebar_args['_display'] && isset($control['params'][0]['number']) ) { // number == -1 implies a template where id numbers are replaced by a generic '%i%' diff --git a/wp-admin/menu.php b/wp-admin/menu.php index 2d77713131..20ee20e397 100644 --- a/wp-admin/menu.php +++ b/wp-admin/menu.php @@ -124,7 +124,9 @@ foreach ( $menu as $id => $data ) { unset($submenu[$old_parent][$index]); } unset($submenu[$old_parent]); - $_wp_submenu_nopriv[$new_parent] = $_wp_submenu_nopriv[$old_parent]; + + if ( isset($_wp_submenu_nopriv[$old_parent]) ) + $_wp_submenu_nopriv[$new_parent] = $_wp_submenu_nopriv[$old_parent]; } } diff --git a/wp-admin/upload.php b/wp-admin/upload.php index 984ff24162..72ada70f8a 100644 --- a/wp-admin/upload.php +++ b/wp-admin/upload.php @@ -177,7 +177,7 @@ if ( isset($_GET['detached']) ) { $h2_noun = $post_mime_type_label; // Use $_GET instead of is_ since they can override each other $h2_author = ''; - $_GET['author'] = (int) $_GET['author']; + $_GET['author'] = isset( $_GET['author'] ) ? (int) $_GET['author'] : 0; if ( $_GET['author'] != 0 ) { if ( $_GET['author'] == '-' . $user_ID ) { // author exclusion $h2_author = ' ' . __('by other authors'); diff --git a/wp-admin/user-edit.php b/wp-admin/user-edit.php index ad5e2731a7..260555fb94 100644 --- a/wp-admin/user-edit.php +++ b/wp-admin/user-edit.php @@ -157,7 +157,7 @@ include ('admin-header.php');
- +
    (.+?)<\/a>/', $content, $matches ); - $j = 0; + $links_summary = "\n"; for ( $i=0; $i