diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php index df5d6f5f41..c1f7f5f36e 100644 --- a/wp-admin/includes/media.php +++ b/wp-admin/includes/media.php @@ -2969,13 +2969,19 @@ function wp_add_id3_tag_data( &$metadata, $data ) { * @return array|bool Returns array of metadata, if found. */ function wp_read_video_metadata( $file ) { - if ( ! file_exists( $file ) ) + if ( ! file_exists( $file ) ) { return false; + } $metadata = array(); - if ( ! class_exists( 'getID3', false ) ) + if ( ! defined( 'GETID3_TEMP_DIR' ) ) { + define( 'GETID3_TEMP_DIR', get_temp_dir() ); + } + + if ( ! class_exists( 'getID3', false ) ) { require( ABSPATH . WPINC . '/ID3/getid3.php' ); + } $id3 = new getID3(); $data = $id3->analyze( $file ); @@ -3025,12 +3031,18 @@ function wp_read_video_metadata( $file ) { * @return array|bool Returns array of metadata, if found. */ function wp_read_audio_metadata( $file ) { - if ( ! file_exists( $file ) ) + if ( ! file_exists( $file ) ) { return false; + } $metadata = array(); - if ( ! class_exists( 'getID3', false ) ) + if ( ! defined( 'GETID3_TEMP_DIR' ) ) { + define( 'GETID3_TEMP_DIR', get_temp_dir() ); + } + + if ( ! class_exists( 'getID3', false ) ) { require( ABSPATH . WPINC . '/ID3/getid3.php' ); + } $id3 = new getID3(); $data = $id3->analyze( $file ); diff --git a/wp-includes/version.php b/wp-includes/version.php index cc8f507c27..de20e1e8d9 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-alpha-34865'; +$wp_version = '4.4-alpha-34866'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.