Skip to content

Commit

Permalink
Cast space allowed to an integer later in the function.
Browse files Browse the repository at this point in the history
  • Loading branch information
peterwilsoncc committed Aug 20, 2024
1 parent 45a6704 commit ef64da1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/wp-includes/ms-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -2558,13 +2558,16 @@ function get_space_allowed() {
$space_allowed = get_option( 'blog_upload_space' );

if ( ! is_numeric( $space_allowed ) ) {
$space_allowed = (int) get_site_option( 'blog_upload_space' );
$space_allowed = get_site_option( 'blog_upload_space' );
}

if ( ! is_numeric( $space_allowed ) ) {
$space_allowed = 100;
}

// Cast the value to an integer.
$space_allowed = (int) $space_allowed;

/**
* Filters the upload quota for the current site.
*
Expand Down

0 comments on commit ef64da1

Please sign in to comment.