mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
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. Built from https://develop.svn.wordpress.org/trunk@59465 git-svn-id: http://core.svn.wordpress.org/trunk@58851 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ee60151913
commit
001cc12b71
@ -992,7 +992,7 @@ function upgrade_110() {
|
|||||||
|
|
||||||
$time_difference = $all_options->time_difference;
|
$time_difference = $all_options->time_difference;
|
||||||
|
|
||||||
$server_time = time() + gmdate( 'Z' );
|
$server_time = time() + (int) gmdate( 'Z' );
|
||||||
$weblogger_time = $server_time + $time_difference * HOUR_IN_SECONDS;
|
$weblogger_time = $server_time + $time_difference * HOUR_IN_SECONDS;
|
||||||
$gmt_time = time();
|
$gmt_time = time();
|
||||||
|
|
||||||
|
@ -317,7 +317,7 @@ class WP_Date_Query {
|
|||||||
$_year = $date_query['year'];
|
$_year = $date_query['year'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$max_days_of_year = gmdate( 'z', mktime( 0, 0, 0, 12, 31, $_year ) ) + 1;
|
$max_days_of_year = (int) gmdate( 'z', mktime( 0, 0, 0, 12, 31, $_year ) ) + 1;
|
||||||
} else {
|
} else {
|
||||||
// Otherwise we use the max of 366 (leap-year).
|
// Otherwise we use the max of 366 (leap-year).
|
||||||
$max_days_of_year = 366;
|
$max_days_of_year = 366;
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '6.8-alpha-59464';
|
$wp_version = '6.8-alpha-59465';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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.
|
||||||
|
Loading…
Reference in New Issue
Block a user