Make WordPress Core

Opened 3 weeks ago

Last modified 3 weeks ago

#47494 reviewing defect (bug)

current_time function return types

Reported by: zzhovo Owned by: SergeyBiryukov
Milestone: 5.3 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 3 weeks ago.
possible patch

Download all attachments as: .zip

Change History (3)

3 weeks ago

possible patch

#1 @SergeyBiryukov
3 weeks ago

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

#2 @Rarst
3 weeks ago

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

Note: See TracTickets for help on using tickets.