Do not block XML-RPC uploads when upload_space_check_disabled is true, regardless of fileupload_maxk value. props SergeyBiryukov. fixes #16217

git-svn-id: http://core.svn.wordpress.org/trunk@21237 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
markjaquith 2012-07-09 03:49:23 +00:00
parent 09f66013f5
commit 3b46a53530

View File

@ -1653,7 +1653,7 @@ function redirect_this_site( $deprecated = '' ) {
* @return mixed If the upload is under the size limit, $upload is returned. Otherwise returns an error message.
*/
function upload_is_file_too_big( $upload ) {
if ( is_array( $upload ) == false || defined( 'WP_IMPORTING' ) )
if ( is_array( $upload ) == false || defined( 'WP_IMPORTING' ) || get_site_option( 'upload_space_check_disabled' ) )
return $upload;
if ( strlen( $upload['bits'] ) > ( 1024 * get_site_option( 'fileupload_maxk', 1500 ) ) )