Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #58986


Ignore:
Timestamp:
08/05/2023 07:05:33 PM (21 months ago)
Author:
sabernhardt
Comment:

Hi and thanks for the ticket!

WP_REST_Posts_Controller::prepare_item_for_response() probably needs the same change as the current_time() function in #57035. Note: the offset is not always an integer (#57998).

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #58986

    • Property Keywords needs-patch added
    • Property Focuses rest-api added
    • Property Component changed from REST API to Date/Time
  • Ticket #58986 – Description

    initial v1  
    1 Path: /wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php
    2 File: class-wp-rest-posts-controller.php
     1Path: `/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php`
     2File: `class-wp-rest-posts-controller.php`
    33Line: 1833
    44
    5 **Expression Error: get_option('gmt_offset') * HOUR_IN_SECONDS
    6 **Rais Exception: TypeError: Unsupported operand types: string * int
     5**Expression Error:** `get_option('gmt_offset') * HOUR_IN_SECONDS`
     6**Rais Exception:** `TypeError: Unsupported operand types: string * int`
    77
    88
    9 Suggested Fix: intval(get_option('gmt_offset')) * HOUR_IN_SECONDS
     9Suggested Fix: `intval(get_option('gmt_offset')) * HOUR_IN_SECONDS`
    1010
    1111Thanks