Make WordPress Core


Ignore:
Timestamp:
11/27/2024 11:38:10 AM (17 months ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Cast gmdate( 'Z' ) to an integer before addition.

This addresses two instances of the (numeric string) gmdate( 'Z' ) being added to an int value.

Affected functions:

  • upgrade_110()
  • WP_Date_Query::validate_date_values()

Follow-up to [942], [29925], [45424].

Props justlevine.
See #52217.

File:
1 edited

Legend:

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

    r59166 r59465  
    993993    $time_difference = $all_options->time_difference;
    994994
    995     $server_time    = time() + gmdate( 'Z' );
     995    $server_time    = time() + (int) gmdate( 'Z' );
    996996    $weblogger_time = $server_time + $time_difference * HOUR_IN_SECONDS;
    997997    $gmt_time       = time();
Note: See TracChangeset for help on using the changeset viewer.