Changeset 9270 for trunk/wp-includes/functions.php
- Timestamp:
- 10/21/2008 11:54:18 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/functions.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions.php
r9243 r9270 1894 1894 // separate the filename into a name and extension 1895 1895 $info = pathinfo($filename); 1896 $ext = $info['extension'];1896 $ext = !empty($info['extension']) ? $info['extension'] : ''; 1897 1897 $name = basename($filename, ".{$ext}"); 1898 1898 … … 1907 1907 $number = ''; 1908 1908 1909 if ( empty( $ext ) ) 1910 $ext = ''; 1911 else 1909 if ( !empty( $ext ) ) 1912 1910 $ext = strtolower( ".$ext" ); 1913 1911 … … 1952 1950 function wp_upload_bits( $name, $deprecated, $bits, $time = null ) { 1953 1951 if ( empty( $name ) ) 1954 return array( 'error' => __( "Empty filename") );1952 return array( 'error' => __( 'Empty filename' ) ); 1955 1953 1956 1954 $wp_filetype = wp_check_filetype( $name ); 1957 1955 if ( !$wp_filetype['ext'] ) 1958 return array( 'error' => __( "Invalid file type") );1956 return array( 'error' => __( 'Invalid file type' ) ); 1959 1957 1960 1958 $upload = wp_upload_dir( $time );
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)