Make WordPress Core

Ticket #52471: 52471.patch

File 52471.patch, 1.6 KB (added by ayeshrajans, 4 years ago)
  • src/wp-admin/includes/class-wp-debug-data.php

    diff --git a/src/wp-admin/includes/class-wp-debug-data.php b/src/wp-admin/includes/class-wp-debug-data.php
    index f68233dd61..7385f374ab 100644
    a b static function debug_data() { 
    543543                        );
    544544                } else {
    545545                        // Get the PHP ini directive values.
    546                         $post_max_size       = ini_get( 'post_max_size' );
    547                         $upload_max_filesize = ini_get( 'upload_max_filesize' );
     546                        $post_max_size       = wp_convert_hr_to_bytes( ini_get( 'post_max_size' ) );
     547                        $upload_max_filesize = wp_convert_hr_to_bytes( ini_get( 'upload_max_filesize' ) );
    548548                        $max_file_uploads    = ini_get( 'max_file_uploads' );
    549                         $effective           = min( wp_convert_hr_to_bytes( $post_max_size ), wp_convert_hr_to_bytes( $upload_max_filesize ) );
     549                        $effective           = min( $post_max_size, $upload_max_filesize );
    550550
    551551                        // Add info in Media section.
    552552                        $info['wp-media']['fields']['file_uploads']        = array(
    static function debug_data() { 
    556556                        );
    557557                        $info['wp-media']['fields']['post_max_size']       = array(
    558558                                'label' => __( 'Max size of post data allowed' ),
    559                                 'value' => $post_max_size,
     559                                'value' => size_format( $post_max_size ),
    560560                        );
    561561                        $info['wp-media']['fields']['upload_max_filesize'] = array(
    562562                                'label' => __( 'Max size of an uploaded file' ),
    563                                 'value' => $upload_max_filesize,
     563                                'value' => size_format( $upload_max_filesize ),
    564564                        );
    565565                        $info['wp-media']['fields']['max_effective_size']  = array(
    566566                                'label' => __( 'Max effective file size' ),