mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
MS: Handle the possibility of 0 when checking a user's upload quota.
Upload space of 0 is now more possible via r35016 and should be respected rather than modified to a default of 10MB. Fixes #34037. Built from https://develop.svn.wordpress.org/trunk@35017 git-svn-id: http://core.svn.wordpress.org/trunk@34982 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
49ce208880
commit
3b42b801f8
@ -417,9 +417,9 @@ function upload_is_user_over_quota( $echo = true ) {
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
$space_allowed = get_space_allowed();
|
$space_allowed = get_space_allowed();
|
||||||
if ( empty( $space_allowed ) || !is_numeric( $space_allowed ) )
|
if ( ! is_numeric( $space_allowed ) ) {
|
||||||
$space_allowed = 10; // Default space allowed is 10 MB
|
$space_allowed = 10; // Default space allowed is 10 MB
|
||||||
|
}
|
||||||
$space_used = get_space_used();
|
$space_used = get_space_used();
|
||||||
|
|
||||||
if ( ( $space_allowed - $space_used ) < 0 ) {
|
if ( ( $space_allowed - $space_used ) < 0 ) {
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.4-alpha-35016';
|
$wp_version = '4.4-alpha-35017';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user