[buddypress-trac] [BuddyPress Trac] #8966: Improve `bp_core_get_upload_dir()`
buddypress-trac
noreply at wordpress.org
Tue Aug 1 21:19:45 UTC 2023
#8966: Improve `bp_core_get_upload_dir()`
--------------------------+-------------------------
Reporter: imath | Owner: imath
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 12.0.0
Component: Core | Version:
Severity: normal | Keywords: needs-patch
--------------------------+-------------------------
This [https://buddypress.org/support/topic/getting-array-offset-error-on-
value-type-bool/ topic] made me realize this
[https://github.com/buddypress/buddypress/blob/master/src/bp-core/bp-core-
avatars.php#L1671 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.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/8966>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list