Make WordPress Core

Ticket #55888: 55888-1.patch

File 55888-1.patch, 1.0 KB (added by rafiahmedd, 3 years ago)

2nd opinion.

  • src/wp-admin/includes/class-wp-community-events.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
    diff --git a/src/wp-admin/includes/class-wp-community-events.php b/src/wp-admin/includes/class-wp-community-events.php
    a b  
    352352         *                     on success, false on failure.
    353353         */
    354354        public function get_cached_events() {
    355                 $cached_response = get_site_transient( $this->get_events_transient_key( $this->user_location ) );
     355                $cached_response = get_site_transient( $this->get_events_transient_key( $this->user_location ) )
     356                        ? get_site_transient( $this->get_events_transient_key( $this->user_location ) ) : false;
    356357
    357358                if ( isset( $cached_response['events'] ) ) {
    358359                        $cached_response['events'] = $this->trim_events( $cached_response['events'] );