[wp-trac] [WordPress Trac] #55888: False is not a valid cache key in community-events

WordPress Trac noreply at wordpress.org
Tue Sep 27 18:56:06 UTC 2022


#55888: False is not a valid cache key in community-events
-------------------------------------------------+-------------------------
 Reporter:  malthert                             |       Owner:
                                                 |  davidbaumwald
     Type:  defect (bug)                         |      Status:  closed
 Priority:  normal                               |   Milestone:  6.1
Component:  Administration                       |     Version:
 Severity:  normal                               |  Resolution:  fixed
 Keywords:  has-patch changes-requested dev-     |     Focuses:
  feedback                                       |
-------------------------------------------------+-------------------------
Changes (by davidbaumwald):

 * status:  reviewing => closed
 * resolution:   => fixed


Comment:

 In [changeset:"54338" 54338]:
 {{{
 #!CommitTicketReference repository="" revision="54338"
 Administration: Guard against `false` transient key in
 `get_cached_events()`.

 Inside `WP_Community_Events::get_cached_events()`,
 `WP_Community_Events::get_events_transient_key()` is used to retrieve the
 transient key name, based on the user's location.  However, the transient
 key can potentially return `false`, resulting in a call to
 `get_site_transient()` with the `$key` being `false`.

 This change first attempts to evaluate and guard against a `false` return
 from `WP_Community_Events::get_events_transient_key()`.  The result is an
 early `false` return from `WP_Community_Events::get_cached_events()`.

 Props malthert, rafiahmedd, audrasjb, costdev.
 Fixes #55888.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/55888#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list