Make WordPress Core

Ticket #26265: 26265.patch

File 26265.patch, 1.3 KB (added by chriscct7, 10 years ago)
  • src/wp-admin/includes/media.php

     
    29692969 * @return array|bool Returns array of metadata, if found.
    29702970 */
    29712971function wp_read_video_metadata( $file ) {
    2972         if ( ! file_exists( $file ) )
     2972        if ( ! file_exists( $file ) ) {
    29732973                return false;
     2974        }
    29742975
    29752976        $metadata = array();
    29762977
    2977         if ( ! class_exists( 'getID3', false ) )
     2978        if ( ! defined( 'GETID3_TEMP_DIR' ) ) {
     2979                define( 'GETID3_TEMP_DIR', get_temp_dir() );
     2980        }
     2981
     2982        if ( ! class_exists( 'getID3', false ) ) {
    29782983                require( ABSPATH . WPINC . '/ID3/getid3.php' );
     2984        }
    29792985        $id3 = new getID3();
    29802986        $data = $id3->analyze( $file );
    29812987
     
    30253031 * @return array|bool Returns array of metadata, if found.
    30263032 */
    30273033function wp_read_audio_metadata( $file ) {
    3028         if ( ! file_exists( $file ) )
     3034        if ( ! file_exists( $file ) ) {
    30293035                return false;
     3036        }
    30303037        $metadata = array();
    30313038
    3032         if ( ! class_exists( 'getID3', false ) )
     3039        if ( ! defined( 'GETID3_TEMP_DIR' ) ) {
     3040                define( 'GETID3_TEMP_DIR', get_temp_dir() );
     3041        }
     3042
     3043        if ( ! class_exists( 'getID3', false ) ) {
    30333044                require( ABSPATH . WPINC . '/ID3/getid3.php' );
     3045        }
    30343046        $id3 = new getID3();
    30353047        $data = $id3->analyze( $file );
    30363048