#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 (12)
This ticket was mentioned in PR #2764 on WordPress/wordpress-develop by kkmuffme.
4 years ago
#1
- Keywords has-patch added
#2
@
4 years ago
- Component changed from General to Administration
- Milestone changed from Awaiting Review to 6.1
#4
@
4 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.
4 years ago
#6
@
4 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
@
4 years ago
- Keywords dev-feedback added
Calling get_site_transient( false ) doesn't cause any notices/warning/errors. What am I missing?
#8
@
4 years ago
@costdev I can't remember it's been a while and I don't have time to dive into it atm, but since the function arg is string, we shouldn't pass a bool at least.
@SergeyBiryukov commented on PR #2764:
8 months ago
#11
Thanks for the PR! This was merged in r54338.
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