[wp-trac] [WordPress Trac] #58737: Site Health Info doesnt show correct value for file_uploads in debug/clipboard text

WordPress Trac noreply at wordpress.org
Thu Jul 6 13:43:31 UTC 2023


#58737: Site Health Info doesnt show correct value for file_uploads in
debug/clipboard text
--------------------------+-----------------------------
 Reporter:  Michi91       |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Site Health   |    Version:  trunk
 Severity:  normal        |   Keywords:  needs-patch
  Focuses:                |
--------------------------+-----------------------------
 With #50038 checks for `file_uploads` were added in Site Health.


 https://github.com/WordPress/WordPress/blob/29791cad8c5ee936f5a3bd1e9d86c040fef2f576
 /wp-admin/includes/class-wp-debug-data.php#L557

 {{{#!php
 // Add info in Media section.
                         $info['wp-media']['fields']['file_uploads']
 = array(
                                 'label' => __( 'File uploads' ),
                                 'value' => empty( ini_get( 'file_uploads'
 ) ) ? __( 'Disabled' ) : __( 'Enabled' ),
                                 'debug' => 'File uploads is turned off',
                         );
 }}}

 As you can see, the value for the Site Health report is set, but the value
 for 'debug' / clipboard text is always 'File uploads is turned off'.


 {{{
 ### wp-media ###
 ...
 file_uploads: File uploads is turned off
 ...
 }}}


 From my perspective the value for 'debug' should be set to "on", "off" or
 "true", "false" or even a text, to display the correct value to the report
 that is copied to the clipboard.


 {{{
 ### wp-media ###
 ...
 file_uploads: false
 ...
 }}}
 or
 {{{
 ### wp-media ###
 ...
 file_uploads: true
 ...
 }}}


 This is my first ticket here.

 I didnt provide a patch yet, as I m not sure what values should be set for
 'debug'. I personally would prefere "true" and "false", but as right now
 the value is a text, I m not sure about the correct way.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/58737>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list