Make WordPress Core

Changeset 58011


Ignore:
Timestamp:
04/16/2024 04:50:43 PM (2 months ago)
Author:
SergeyBiryukov
Message:

Users: Set the default value of COOKIE_DOMAIN to an empty string.

This matches the type expected by the setcookie() function for the $domain parameter, and resolves a fatal error if strict_types is enabled.

Reference: PHP Manual: setcookie().

Follow-up to [2725], [6434], [12732], [13062].

Props kmvan, rajinsharwar, jrf, desrosj, Cybr, nicolefurlan, oglekler, hellofromTonya, kirasong, chaion07, mukesh27.
Fixes #46550.

File:
1 edited

Legend:

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

    r56727 r58011  
    326326    /**
    327327     * @since 2.0.0
     328     * @since 6.5.0 The value has changed from false to an empty string.
    328329     */
    329330    if ( ! defined( 'COOKIE_DOMAIN' ) ) {
    330         define( 'COOKIE_DOMAIN', false );
     331        define( 'COOKIE_DOMAIN', '' );
    331332    }
    332333
Note: See TracChangeset for help on using the changeset viewer.