Opened 12 years ago
Closed 12 years ago
#5590 closed defect (bug) (fixed)
Undefined offset when updating the last_activity
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 2.1 | Priority: | normal |
| Severity: | normal | Version: | 2.0 |
| Component: | Core | Keywords: | has-patch needs-unit-tests |
| Cc: |
Description
I think it's linked to r8320
Seems the cached value should be the entire array and not only the value of the user_id index in BP_Core_User::get_last_activity()
Attachments (3)
Change History (10)
#2
@
12 years ago
- Milestone changed from Awaiting Review to 2.0.1
Well, another way is to not try to update the activity using an index that is not set. See 5590.02.diff
#3
@
12 years ago
- Milestone changed from 2.0.1 to 2.1
Are we sure this needs to be fixed in 2.0.1? If it was caused by r8320, it's not in the 2.0 branch.
Well, another way is to not try to update the activity using an index that is not set. See 5590.02.diff
This change would definitely need unit tests. I'd have to look closer to see how it would affect existing content, fetching for multiple users, etc.
#5
@
12 years ago
See #5597 for more details on this issue, closed a duplicate of this one since there's discussion here already.
Also see r8326 (committed to trunk) which tests subsequent calls to BP_Core_User::get_last_activity() to compare cached results to original non-cached results.
The 'bp_last_activity' cache is already keyed by user ID. Storing the whole
$retvalarray doesn't seem right. This needs further investigation and unit tests.