The MU forums have moved to WordPress.org

Fix for Max file size not working (2 posts)

  1. macgruder
    Member
    Posted 17 years ago #

    Some people have been having a problem with Max file size not working. (Remember your php.ini file will over-ride your setting IF IT IS LOWER than your Wordpress setting)

    Here is a fix:

    Go to

    /wp-admin/upload-functions.php

    Around Line 211 AFTER

    $file = wp_handle_upload($_FILES['image'], $overrides);

    ADD these TWO lines:

    if( isset( $file[ 'error' ] ) == false )
    $file[ 'error' ] = apply_filters( "check_uploaded_file", $file[ 'error' ] );

    I think this is a genuine bug (and a fix :-) but no guarantees. If you apply this fix and days later you come across the Statue of Liberty half buried in the sand don't blame me.

    Macgruder

  2. nims
    Member
    Posted 17 years ago #

    Thanks for the fix Macgruder. I am surely going to give it a try even if I "come across the Statue of Liberty half buried in the sand " :-)

    Donncha might be interested to close one ticket on trac by using this fix if it works. Here's the ticket http://trac.mu.wordpress.org/ticket/378

About this Topic