Make WordPress Core


Ignore:
Timestamp:
07/21/2020 03:38:40 PM (6 years ago)
Author:
SergeyBiryukov
Message:

Site Health: Remove parse_ini_size(), use the existing wp_convert_hr_to_bytes() function instead.

Follow-up to [48535].

See #50038.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-site-health.php

    r48535 r48538  
    19571957
    19581958        /**
    1959          * Test if 'file_uploads' directive in PHP.ini is turned off
     1959         * Test if 'file_uploads' directive in PHP.ini is turned off.
    19601960         *
    19611961         * @since 5.5.0
     
    20082008                }
    20092009
    2010                 if ( parse_ini_size( ini_get( 'post_max_size' ) ) !== parse_ini_size( ini_get( 'upload_max_filesize' ) ) ) {
     2010                $post_max_size   = ini_get( 'post_max_size' );
     2011                $upload_max_size = ini_get( 'upload_max_filesize' );
     2012
     2013                if ( wp_convert_hr_to_bytes( $post_max_size ) !== wp_convert_hr_to_bytes( $upload_max_size ) ) {
    20112014                        $result['label']       = __( 'Mismatched "post_max_size" and "upload_max_filesize" values.' );
    20122015                        $result['status']      = 'recommended';
Note: See TracChangeset for help on using the changeset viewer.