Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#47494 closed defect (bug) (duplicate)

current_time function return types

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

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

Download all attachments as: .zip

Change History (4)

@zzhovo
7 years ago

possible patch

#1 @SergeyBiryukov
7 years ago

  • Focuses docs added
  • Milestone Awaiting Review5.3
  • Owner set to SergeyBiryukov
  • Status newreviewing

#2 @Rarst
7 years ago

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

#3 @Rarst
7 years ago

  • Milestone 5.3
  • Resolutionduplicate
  • Status reviewingclosed

Fixed in #40653

Note: See TracTickets for help on using tickets.