[wp-trac] [WordPress Trac] #58986: TypeError: Unsupported operand types: string * int *

WordPress Trac noreply at wordpress.org
Sat Aug 5 17:08:48 UTC 2023


#58986: TypeError: Unsupported operand types: string * int *
-------------------------------+-----------------------------
 Reporter:  nurielmeni         |      Owner:  (none)
     Type:  defect (bug)       |     Status:  new
 Priority:  normal             |  Milestone:  Awaiting Review
Component:  REST API           |    Version:  6.2.2
 Severity:  critical           |   Keywords:
  Focuses:  php-compatibility  |
-------------------------------+-----------------------------
 Path: /wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php
 File: class-wp-rest-posts-controller.php
 Line: 1833

 **Expression Error: get_option('gmt_offset') * HOUR_IN_SECONDS
 **Rais Exception: TypeError: Unsupported operand types: string * int


 Suggested Fix: intval(get_option('gmt_offset')) * HOUR_IN_SECONDS

 Thanks

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


More information about the wp-trac mailing list