[wp-trac] [WordPress Trac] #57623: Retrieves the current time based on specified type

WordPress Trac noreply at wordpress.org
Fri Feb 3 09:49:46 UTC 2023


#57623: Retrieves the current time based on specified type
--------------------------+-----------------------------
 Reporter:  vahan889      |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  6.1.1
 Severity:  critical      |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 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;
 }}}


 Thanks,
 Vahan

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/57623>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list