Make WordPress Core


Ignore:
Timestamp:
09/02/2023 06:34:59 PM (13 months ago)
Author:
SergeyBiryukov
Message:

Site Health: Show correct debug value for file uploads.

Follow-up to [48535].

Props Michi91, Presskopp.
Fixes #58737.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-debug-data.php

    r56475 r56509  
    549549        } else {
    550550            // Get the PHP ini directive values.
     551            $file_uploads        = ini_get( 'file_uploads' );
    551552            $post_max_size       = ini_get( 'post_max_size' );
    552553            $upload_max_filesize = ini_get( 'upload_max_filesize' );
     
    557558            $info['wp-media']['fields']['file_uploads']        = array(
    558559                'label' => __( 'File uploads' ),
    559                 'value' => empty( ini_get( 'file_uploads' ) ) ? __( 'Disabled' ) : __( 'Enabled' ),
    560                 'debug' => 'File uploads is turned off',
     560                'value' => $file_uploads ? __( 'Enabled' ) : __( 'Disabled' ),
     561                'debug' => $file_uploads,
    561562            );
    562563            $info['wp-media']['fields']['post_max_size']       = array(
Note: See TracChangeset for help on using the changeset viewer.