Make WordPress Core

Ticket #34037: 34037.diff

File 34037.diff, 1.7 KB (added by jeremyfelt, 9 years ago)
  • src/wp-includes/ms-functions.php

     
    22962296        if ( ! is_numeric( $space_allowed ) )
    22972297                $space_allowed = get_site_option( 'blog_upload_space' );
    22982298
    2299         if ( empty( $space_allowed ) || ! is_numeric( $space_allowed ) )
     2299        if ( ! is_numeric( $space_allowed ) )
    23002300                $space_allowed = 100;
    23012301
    23022302        /**
  • tests/phpunit/tests/multisite/getSpaceAllowed.php

     
    9494                        array( false, false, 100 ),
    9595                        array( 'NAN', 'NAN', 100 ),
    9696
    97                         // These are likely unexpected.
    98                         array( 0,     666,   100 ),
    99                         array( false, 0,     100 ),
    100                         array( 'NAN', 0,     100 ),
     97                        // These effectively disable uploads.
     98                        array( 0,     666,   0 ),
     99                        array( false, 0,     0 ),
     100                        array( 'NAN', 0,     0 ),
    101101                );
    102102        }
    103103
  • tests/phpunit/tests/multisite/isUploadSpaceAvailable.php

     
    102102                $available = is_upload_space_available();
    103103                remove_filter( 'pre_get_space_used', array( $this, '_filter_space_used_small' ) );
    104104
    105                 $this->assertTrue( $available );
     105                $this->assertFalse( $available );
    106106        }
    107107
    108108        function test_is_upload_space_available_upload_space_negative() {