Make WordPress Core

#57623 closed defect (bug) (duplicate)

Retrieves the current time based on specified type

Reported by: vahan889's profile vahan889 Owned by:
Milestone: Priority: normal
Severity: critical Version: 6.1.1
Component: Date/Time Keywords:
Focuses: Cc:


Hi !

During my work, I got a critical error that comes from this file: wp-includes/functions.php:75, says:
PHP Fatal error: Uncaught TypeError: Unsupported operand types: string * int in ...\wp-includes\functions.php:75

That line (functions.php, line 75) says the following (FYI: the gmt_offset option is empty):

return $gmt ? time() : time() + (int) ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS );

I think it can be:

return $gmt ? time() : time() + (int) get_option( 'gmt_offset' ) * HOUR_IN_SECONDS;


Change History (1)

#1 @SergeyBiryukov
17 months ago

  • Component changed from General to Date/Time
  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Hi there, welcome to WordPress Trac! Thanks for the report.

This is already fixed for WordPress 6.2 in [55054] / #57035.

Note: See TracTickets for help on using tickets.