Make WordPress Core

Opened 11 months ago

Last modified 10 months ago

#58265 new enhancement

Show defined but empty values for constants in Site Health

Reported by: presskopp's profile Presskopp Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Site Health Keywords: has-screenshots good-first-bug has-patch
Focuses: Cc:

Description

Right now, for example if DB_COLLATE is defined as '', the value will not be shown in the WordPress Constants list, there's just an empty space. What about exchanging empty, but defined values for "Defined, but empty" or "empty value" or something similar for more clarity?

Patching class-wp-debug-data.php, ~L. 333 does the job:

'value' => ( defined( 'DB_COLLATE' ) ? ( DB_COLLATE === '' ? __( 'Defined as empty' ) : DB_COLLATE ) : __( 'Undefined' ) ),


Attachments (1)

empty.png (14.8 KB) - added by Presskopp 11 months ago.

Download all attachments as: .zip

Change History (4)

@Presskopp
11 months ago

#1 @Presskopp
11 months ago

Of course if this would be welcomed, debug should also be altered

#2 @Presskopp
10 months ago

  • Keywords good-first-bug added

This ticket was mentioned in PR #4765 on WordPress/wordpress-develop by @Presskopp.


10 months ago
#3

  • Keywords has-patch added

This patch is mainly to test providing patches using github

Note: See TracTickets for help on using tickets.