#58737 closed defect (bug) (fixed)
Site Health Info doesnt show correct value for file_uploads in debug/clipboard text
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 6.4 | Priority: | normal |
Severity: | normal | Version: | 6.3 |
Component: | Site Health | Keywords: | has-patch |
Focuses: | Cc: |
Description
With #50038 checks for file_uploads
were added in Site Health.
// 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.
Change History (6)
This ticket was mentioned in PR #5129 on WordPress/wordpress-develop by MichaelSalp.
19 months ago
#2
- Keywords has-patch added; needs-patch removed
See Ticket.
Trac ticket: https://core.trac.wordpress.org/ticket/58737
#5
@
19 months ago
- Owner set to SergeyBiryukov
- Resolution set to fixed
- Status changed from new to closed
In 56509:
@SergeyBiryukov commented on PR #5129:
19 months ago
#6
Thanks for the PR! Merged in r56509.
Hi @Michi91,
Nice find! I think you're good to go with just:
'value' => empty( ini_get( 'file_uploads' ) ) ? __( 'Disabled' ) : __( 'Enabled' ), 'debug' => empty( ini_get( 'file_uploads' ) ) ? 'Disabled' : 'Enabled',
I'd like to see you upload your patch. Let's get this into core!