Opened 3 years ago
Closed 2 years ago
#55888 closed defect (bug) (fixed)
False is not a valid cache key in community-events
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 6.1 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Administration | Keywords: | has-patch changes-requested dev-feedback |
Focuses: | Cc: |
Description
There is a check for this in 1 place, but it's missing in the other, causing issues, since you pass an invalid type to get_site_transient
Attachments (1)
Change History (11)
This ticket was mentioned in PR #2764 on WordPress/wordpress-develop by kkmuffme.
3 years ago
#1
- Keywords has-patch added
#2
@
3 years ago
- Component changed from General to Administration
- Milestone changed from Awaiting Review to 6.1
#4
@
3 years ago
Early return is better and also it's more in the style of the existing check of line 337
This ticket was mentioned in Slack in #core by audrasjb. View the logs.
3 years ago
#6
@
3 years ago
- Keywords changes-requested added
Reviewed during today's bug scrub.
The patch doesn’t look bad, but I’d say the last comment would probably provide a better approach for this (early return when falsey transient key).
#7
@
3 years ago
- Keywords dev-feedback added
Calling get_site_transient( false )
doesn't cause any notices/warning/errors. What am I missing?
Note: See
TracTickets for help on using
tickets.
Add check for false transient key, which is not a valid key.
There already is a check in the other place in this file where this is used. Added it in all places now.
Trac ticket: https://core.trac.wordpress.org/ticket/55888#ticket