diff --git a/wp-includes/media.php b/wp-includes/media.php index a054282040..4007fec7b9 100644 --- a/wp-includes/media.php +++ b/wp-includes/media.php @@ -3008,7 +3008,11 @@ function wp_enqueue_media( $args = array() ) { $hier = $post && is_post_type_hierarchical( $post->post_type ); - $post_type_object = get_post_type_object( $post->post_type ); + if ( $post ) { + $post_type_object = get_post_type_object( $post->post_type ); + } else { + $post_type_object = get_post_type_object( 'post' ); + } $strings = array( // Generic diff --git a/wp-includes/version.php b/wp-includes/version.php index 88e68c39c1..7ba573ea60 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.3-alpha-32674'; +$wp_version = '4.3-alpha-32675'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.