General: Fix force_ssl_admin() to always return bool.

Props pbearne, costdev, autotutorial, debarghyabanerjee, swissspidy.
Fixes #60023.
Built from https://develop.svn.wordpress.org/trunk@59830


git-svn-id: http://core.svn.wordpress.org/trunk@59172 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Pascal Birchler 2025-02-17 15:32:22 +00:00
parent 2eb7a359e3
commit 1d6b7d6fe8
2 changed files with 3 additions and 3 deletions

View File

@ -6273,7 +6273,7 @@ function validate_file( $file, $allowed_files = array() ) {
* *
* @since 2.6.0 * @since 2.6.0
* *
* @param string|bool $force Optional. Whether to force SSL in admin screens. Default null. * @param string|bool|null $force Optional. Whether to force SSL in admin screens. Default null.
* @return bool True if forced, false if not forced. * @return bool True if forced, false if not forced.
*/ */
function force_ssl_admin( $force = null ) { function force_ssl_admin( $force = null ) {
@ -6281,7 +6281,7 @@ function force_ssl_admin( $force = null ) {
if ( ! is_null( $force ) ) { if ( ! is_null( $force ) ) {
$old_forced = $forced; $old_forced = $forced;
$forced = $force; $forced = (bool) $force;
return $old_forced; return $old_forced;
} }

View File

@ -16,7 +16,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '6.8-alpha-59829'; $wp_version = '6.8-alpha-59830';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.