[wp-trac] [WordPress Trac] #56358: PHP8 TypeError on current_time( 'timestamp' ) if timezone is set to GMT / 0

WordPress Trac noreply at wordpress.org
Tue Aug 9 22:46:45 UTC 2022


#56358: PHP8 TypeError on current_time( 'timestamp' ) if timezone is set to GMT / 0
---------------------------+-----------------------------
 Reporter:  toastercookie  |      Owner:  (none)
     Type:  defect (bug)   |     Status:  new
 Priority:  normal         |  Milestone:  Awaiting Review
Component:  Date/Time      |    Version:  6.0
 Severity:  minor          |   Keywords:
  Focuses:                 |
---------------------------+-----------------------------
 Just a minor bug to report, seems that if you have your timezone set to
 GMT, current_time( 'timestamp' ) throws a fatal error on PHP8, I think
 because 0 is being sent as a string. I can fix by changing my timezone to
 anything else.


 PHP Fatal error:  Uncaught TypeError: Unsupported operand types: string *
 int in /wp-includes/functions.php:75
 Stack trace: #0 /RSSItemPull.php(286): current_time('timestamp')

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


More information about the wp-trac mailing list