Make WordPress Core

Changeset 59377


Ignore:
Timestamp:
11/09/2024 04:28:24 PM (3 months ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Ensure cookie expiration value is an integer in wp_update_user().

This addresses an issue in wp_update_user(), where time() is subtracted from the $logged_in_cookie['expiration'] of type string.

Follow-up to [29043].

Props justlevine.
See #52217.

File:
1 edited

Legend:

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

    r59312 r59377  
    27932793            $remember = false;
    27942794
    2795             if ( false !== $logged_in_cookie && ( $logged_in_cookie['expiration'] - time() ) > $default_cookie_life ) {
     2795            if ( false !== $logged_in_cookie && ( (int) $logged_in_cookie['expiration'] - time() ) > $default_cookie_life ) {
    27962796                $remember = true;
    27972797            }
Note: See TracChangeset for help on using the changeset viewer.