diff --git a/src/wp-admin/edit-form-advanced.php b/src/wp-admin/edit-form-advanced.php index d6a8480dcb..92f56b7038 100644 --- a/src/wp-admin/edit-form-advanced.php +++ b/src/wp-admin/edit-form-advanced.php @@ -426,6 +426,8 @@ if ( isset( $post_new_file ) && current_user_can( $post_type_object->cap->create * @param WP_Post $post Post object. */ do_action( 'post_edit_form_tag', $post ); + +$referer = wp_get_referer(); ?>> @@ -434,7 +436,7 @@ do_action( 'post_edit_form_tag', $post ); - + - + diff --git a/src/wp-admin/includes/class-wp-comments-list-table.php b/src/wp-admin/includes/class-wp-comments-list-table.php index f648063e11..8a04b7f6a2 100644 --- a/src/wp-admin/includes/class-wp-comments-list-table.php +++ b/src/wp-admin/includes/class-wp-comments-list-table.php @@ -361,6 +361,9 @@ class WP_Comments_List_Table extends WP_List_Table { $comment = $a_comment; $the_comment_class = wp_get_comment_status( $comment->comment_ID ); + if ( ! $the_comment_class ) { + $the_comment_class = ''; + } $the_comment_class = join( ' ', get_comment_class( $the_comment_class, $comment->comment_ID, $comment->comment_post_ID ) ); $post = get_post( $comment->comment_post_ID ); diff --git a/src/wp-admin/includes/post.php b/src/wp-admin/includes/post.php index 1e6d9fa3bc..545c57f56e 100644 --- a/src/wp-admin/includes/post.php +++ b/src/wp-admin/includes/post.php @@ -1220,9 +1220,11 @@ function get_sample_permalink($id, $title = null, $name = null) { // Handle page hierarchy if ( $ptype->hierarchical ) { $uri = get_page_uri($post); - $uri = untrailingslashit($uri); - $uri = strrev( stristr( strrev( $uri ), '/' ) ); - $uri = untrailingslashit($uri); + if ( $uri ) { + $uri = untrailingslashit($uri); + $uri = strrev( stristr( strrev( $uri ), '/' ) ); + $uri = untrailingslashit($uri); + } /** This filter is documented in wp-admin/edit-tag-form.php */ $uri = apply_filters( 'editable_slug', $uri ); diff --git a/src/wp-admin/network/themes.php b/src/wp-admin/network/themes.php index 3d4e02dce0..18966d3a20 100644 --- a/src/wp-admin/network/themes.php +++ b/src/wp-admin/network/themes.php @@ -174,7 +174,10 @@ if ( $action ) { -
+ +
diff --git a/src/wp-admin/plugins.php b/src/wp-admin/plugins.php index 629fdbff53..265c1ea7c3 100644 --- a/src/wp-admin/plugins.php +++ b/src/wp-admin/plugins.php @@ -321,7 +321,10 @@ if ( $action ) { -
+ +
diff --git a/src/wp-admin/upgrade.php b/src/wp-admin/upgrade.php index ece3eb056f..4db7f088b4 100644 --- a/src/wp-admin/upgrade.php +++ b/src/wp-admin/upgrade.php @@ -81,8 +81,10 @@ else switch ( $step ) : case 0: $goback = wp_get_referer(); - $goback = esc_url_raw( $goback ); - $goback = urlencode( $goback ); + if ( $goback ) { + $goback = esc_url_raw( $goback ); + $goback = urlencode( $goback ); + } ?>

diff --git a/src/wp-includes/class-http.php b/src/wp-includes/class-http.php index 2b27658f89..8a655f006b 100644 --- a/src/wp-includes/class-http.php +++ b/src/wp-includes/class-http.php @@ -182,7 +182,9 @@ class WP_Http { if ( function_exists( 'wp_kses_bad_protocol' ) ) { if ( $r['reject_unsafe_urls'] ) $url = wp_http_validate_url( $url ); - $url = wp_kses_bad_protocol( $url, array( 'http', 'https', 'ssl' ) ); + if ( $url ) { + $url = wp_kses_bad_protocol( $url, array( 'http', 'https', 'ssl' ) ); + } } $arrURL = @parse_url( $url ); diff --git a/src/wp-includes/theme.php b/src/wp-includes/theme.php index 3f5b5e7455..d2eb765edf 100644 --- a/src/wp-includes/theme.php +++ b/src/wp-includes/theme.php @@ -1050,7 +1050,7 @@ function has_header_image() { * * @since 2.1.0 * - * @return string + * @return string|false */ function get_header_image() { $url = get_theme_mod( 'header_image', get_theme_support( 'custom-header', 'default-image' ) ); @@ -1153,7 +1153,10 @@ function is_random_header_image( $type = 'any' ) { * @since 2.1.0 */ function header_image() { - echo esc_url( get_header_image() ); + $image = get_header_image(); + if ( $image ) { + echo esc_url( $image ); + } } /**