Make WordPress Core

Ticket #58986: 58986.patch

File 58986.patch, 900 bytes (added by nihar007, 16 months ago)

Patch added. I added intval function

  • src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php

    diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php
    index 76ca226c59..1462acb13f 100644
    a b class WP_REST_Posts_Controller extends WP_REST_Controller { 
    17981798                         * with the site's timezone offset applied.
    17991799                         */
    18001800                        if ( '0000-00-00 00:00:00' === $post->post_modified_gmt ) {
    1801                                 $post_modified_gmt = gmdate( 'Y-m-d H:i:s', strtotime( $post->post_modified ) - ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS ) );
     1801                                $post_modified_gmt = gmdate( 'Y-m-d H:i:s', strtotime( $post->post_modified ) - ( intval( get_option( 'gmt_offset' ) ) * HOUR_IN_SECONDS ) );
    18021802                        } else {
    18031803                                $post_modified_gmt = $post->post_modified_gmt;
    18041804                        }