WordPress.org

Make WordPress Core

Ticket #13418: 13418.script-loader-max-upload-size.2.patch

File 13418.script-loader-max-upload-size.2.patch, 681 bytes (added by MikeHansenMe, 8 years ago)

refreshed based on previous patch

  • wp-includes/script-loader.php

     
    195195        $scripts->add( 'swfobject', "/wp-includes/js/swfobject.js", array(), '2.2-20120417');
    196196
    197197        // common bits for both uploaders
    198         $max_upload_size = ( (int) ( $max_up = @ini_get('upload_max_filesize') ) < (int) ( $max_post = @ini_get('post_max_size') ) ) ? $max_up : $max_post;
     198        $max_upload_size = min( (int) @ini_get('upload_max_filesize'), (int) @ini_get('post_max_size') );
    199199
    200200        if ( empty($max_upload_size) )
    201201                $max_upload_size = __('not configured');