WordPress.org

Make WordPress Core

Opened 6 months ago

Closed 4 months ago

#47494 closed defect (bug) (duplicate)

current_time function return types

Reported by: zzhovo Owned by: SergeyBiryukov
Milestone: Priority: normal
Severity: normal Version: 5.2.1
Component: Date/Time Keywords:
Focuses: docs Cc:
PR Number:

Description

WP version 5.2.1, downloaded from https://wordpress.org/download/

After a fresh install, I've changed the timezone to Yerevan from the global settings - /wp-admin/options-general.php

After the save, the get_option( 'gmt_offset' ) started to return float and the function current_time located in \wp-includes\functions.php#65 also started to return float, but it should return int or string.

Attachments (1)

diff (965 bytes) - added by zzhovo 6 months ago.
possible patch

Download all attachments as: .zip

Change History (4)

@zzhovo
6 months ago

possible patch

#1 @SergeyBiryukov
6 months ago

  • Focuses docs added
  • Milestone changed from Awaiting Review to 5.3
  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

#2 @Rarst
6 months ago

Good catch, I've added cast and unit test in my rewrite patch in #40653

#3 @Rarst
4 months ago

  • Milestone 5.3 deleted
  • Resolution set to duplicate
  • Status changed from reviewing to closed

Fixed in #40653

Note: See TracTickets for help on using tickets.