Commit 12f5686f77 for wordpress.org
commit 12f5686f77a04795143c8ce93188bbba4132e36e
Author: Sergey Biryukov <sergeybiryukov.ru@gmail.com>
Date: Mon Oct 14 21:16:17 2024 +0000
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
diff --git a/wp-includes/user.php b/wp-includes/user.php
index 74f3ecba79..700a758990 100644
--- a/wp-includes/user.php
+++ b/wp-includes/user.php
@@ -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'];
diff --git a/wp-includes/version.php b/wp-includes/version.php
index 5321a42bd0..942e73b0f2 100644
--- a/wp-includes/version.php
+++ b/wp-includes/version.php
@@ -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.