Make WordPress Core


Ignore:
Timestamp:
10/21/2008 11:54:18 PM (18 years ago)
Author:
ryan
Message:

Notice fixes from DD32. see #7509

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions.php

    r9243 r9270  
    18941894        // separate the filename into a name and extension
    18951895        $info = pathinfo($filename);
    1896         $ext = $info['extension'];
     1896        $ext = !empty($info['extension']) ? $info['extension'] : '';
    18971897        $name = basename($filename, ".{$ext}");
    18981898
    … …  
    19071907                $number = '';
    19081908
    1909                 if ( empty( $ext ) )
    1910                         $ext = '';
    1911                 else
     1909                if ( !empty( $ext ) )
    19121910                        $ext = strtolower( ".$ext" );
    19131911
    … …  
    19521950function wp_upload_bits( $name, $deprecated, $bits, $time = null ) {
    19531951        if ( empty( $name ) )
    1954                 return array( 'error' => __( "Empty filename" ) );
     1952                return array( 'error' => __( 'Empty filename' ) );
    19551953
    19561954        $wp_filetype = wp_check_filetype( $name );
    19571955        if ( !$wp_filetype['ext'] )
    1958                 return array( 'error' => __( "Invalid file type" ) );
     1956                return array( 'error' => __( 'Invalid file type' ) );
    19591957
    19601958        $upload = wp_upload_dir( $time );
Note: See TracChangeset for help on using the changeset viewer.