Opened 9 years ago
Closed 8 years ago
#7097 closed enhancement (fixed)
Invalid array data inside bp_attachments_uploads_dir_get()
Reported by: | tw2113 | Owned by: | tw2113 |
---|---|---|---|
Milestone: | 2.7 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Media | Keywords: | needs-docs good-first-bug |
Cc: |
Description
In the bp_attachments_uploads_dir_get
function, we attempt to iterate over
$upload_data
. However, that variable is only created via return value from
bp_upload_dir()
which only returns a string. Because of this, there will never be a valid value to do a foreach over.
Attachments (1)
Change History (6)
#2
@
8 years ago
- Component changed from Core to Media
- Keywords good-first-bug added
- Milestone changed from Awaiting Review to Future Release
- Type changed from defect (bug) to enhancement
#3
@
8 years ago
- Owner set to tw2113
- Status changed from new to assigned
Looking over things, I believe @imath is likely correct overall. bp_upload_dir()
is going to be either bool or array, and we return early in bp_attachments_uploads_dir_get()
if false.
Going to make it a return type fix ticket instead.
Note: See
TracTickets for help on using
tickets.
I think it's a docblock issue.
bp_upload_dir()
returns an associative array having these keys:That's because
bp_upload_dir()
is simply the result ofwp_upload_dir()
for the root blog id