Skip to:
Content

BuddyPress.org

#8966 closed defect (bug) (fixed)

Improve `bp_core_get_upload_dir()`

Reported by: imath's profile imath Owned by: imath's profile imath
Milestone: 12.0.0 Priority: normal
Severity: normal Version:
Component: Core Keywords: has-patch
Cc:

Description

This topic made me realize this conditional check was outdated as bp_upload_dir() never returns an array containing an error key but rather false when something is wrong with the WP Uploads dir.

I guess I missed editing this function when working on the BP Attachments API some years ago.

Change History (2)

This ticket was mentioned in PR #147 on buddypress/buddypress by @imath.


17 months ago
#1

  • Keywords has-patch added; needs-patch removed

#2 @imath
17 months ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 13541:

Improve the function to get the Avatar uploads path and url

Update the bp_core_get_upload_dir() function so that it rightly uses the bp_upload_dir() one. The latter is returning false when an error occured while WordPress tried to set the site's uploads directory instead of an array containing an error key.

Props fawp

Fixes #8966
Closes https://github.com/buddypress/buddypress/pull/147

Note: See TracTickets for help on using tickets.