Make WordPress Core

Opened 3 weeks ago

Last modified 2 weeks ago

#47958 new defect (bug)

Incorrect test result for permission check of uploads directory if it doesn't exist yet

Reported by: ocean90 Owned by:
Milestone: 5.3 Priority: normal
Severity: normal Version: 5.2
Component: Site Health Keywords: has-patch
Focuses: Cc:


wp_get_upload_dir() returns the theoretical path of the uploads directory. When there was no upload yet the test returns an incorrect result (not writeable) because the directory doesn't exist.

Switching to wp_upload_dir(), which creates the directory on the fly, ensures a proper test result.

Attachments (1)

47958.diff (587 bytes) - added by ocean90 3 weeks ago.

Download all attachments as: .zip

Change History (2)

3 weeks ago

#1 @afragen
2 weeks ago

This looks like an easy win.

Note: See TracTickets for help on using tickets.