Make WordPress Core

Opened 2 years ago

Closed 2 years 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:


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 2 years ago.
possible patch

Download all attachments as: .zip

Change History (4)

2 years ago

possible patch

#1 @SergeyBiryukov
2 years ago

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

#2 @Rarst
2 years ago

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

#3 @Rarst
2 years 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.