Opened 17 years ago
Closed 14 years ago
#11630 closed defect (bug) (fixed)
0 is not a valid cache key for posts
| Reported by: | hakre | Owned by: | ryan |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.5 |
| Component: | Cache API | Version: | 2.9 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
Description
input sanitization just in case.
Attachments (3)
Change History (12)
#1
@
17 years ago
Reviewed the core code now for appeareances. Found only one where this applies (can not speak for third party code and this is an API function).
the .2 + .3 patch could be merged for an overall improvement.
#2
@
17 years ago
- Keywords dev-feedback added
Would like to see some developer feedback on this one.
#3
@
17 years ago
- Component General → Cache
- Keywords dev-feedback removed
- Milestone Future Release → 3.0
- Owner set to
how does 0 ever get fetched in the first place?
#5
@
16 years ago
- Milestone Awaiting Review
- Resolution → worksforme
- Status new → closed
Re-open with steps to reproduce etc.
#6
@
16 years ago
- Milestone → 3.1
- Resolution worksforme
- Status closed → reopened
This is not per reproduce, this is per spec. We make the assumption, in the object cache in general, and memcached in particular, that a key is not empty. Zero is empty.
#7
@
16 years ago
Both 0 and '0' are valid array keys. The built in object cache uses isset() not empty() to determine if the requested object is stored in cache.
Recommending close.
Alternate patch allowing 0 to better reflect the API. various comment and naming-consistency improvements.