Make WordPress Core

Changeset 59830


Ignore:
Timestamp:
02/17/2025 03:30:29 PM (2 months ago)
Author:
swissspidy
Message:

General: Fix force_ssl_admin() to always return bool.

Props pbearne, costdev, autotutorial, debarghyabanerjee, swissspidy.
Fixes #60023.

Location:
trunk
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/functions.php

    r59828 r59830  
    62746274 * @since 2.6.0
    62756275 *
    6276  * @param string|bool $force Optional. Whether to force SSL in admin screens. Default null.
     6276 * @param string|bool|null $force Optional. Whether to force SSL in admin screens. Default null.
    62776277 * @return bool True if forced, false if not forced.
    62786278 */
     
    62826282    if ( ! is_null( $force ) ) {
    62836283        $old_forced = $forced;
    6284         $forced     = $force;
     6284        $forced     = (bool) $force;
    62856285        return $old_forced;
    62866286    }
Note: See TracChangeset for help on using the changeset viewer.