Users: Further adjust the check for use_ssl meta in wp_insert_user().

This removes a redundant check for a falsey value, which is equivalent to the `empty()` check directly before.

Includes minor adjustments in the unit test:
* Adding a `@covers` tag.
* Correcting the description for clarity.
* Using `assertSame()` for strict type checking.

Follow-up to [59216].

See #60299.
Built from https://develop.svn.wordpress.org/trunk@59232


git-svn-id: http://core.svn.wordpress.org/trunk@58624 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2024-10-14 21:16:17 +00:00
parent da2f8d9cc6
commit 12f5686f77
2 changed files with 2 additions and 2 deletions

View File

@ -2366,7 +2366,7 @@ function wp_insert_user( $userdata ) {
$admin_color = empty( $userdata['admin_color'] ) ? 'fresh' : $userdata['admin_color'];
$meta['admin_color'] = preg_replace( '|[^a-z0-9 _.\-@]|i', '', $admin_color );
$meta['use_ssl'] = empty( $userdata['use_ssl'] ) || ! $userdata['use_ssl'] ? '0' : '1';
$meta['use_ssl'] = empty( $userdata['use_ssl'] ) ? '0' : '1';
$meta['show_admin_bar_front'] = empty( $userdata['show_admin_bar_front'] ) ? 'true' : $userdata['show_admin_bar_front'];

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.7-beta2-59231';
$wp_version = '6.7-beta2-59232';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.