[wp-trac] [WordPress Trac] #47958: Incorrect test result for permission check of uploads directory if it doesn't exist yet

WordPress Trac noreply at wordpress.org
Sun Sep 1 13:50:34 UTC 2019


#47958: Incorrect test result for permission check of uploads directory if it
doesn't exist yet
--------------------------+-----------------------
 Reporter:  ocean90       |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  5.3
Component:  Site Health   |    Version:  5.2
 Severity:  normal        |   Keywords:  has-patch
  Focuses:                |
--------------------------+-----------------------
 `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.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/47958>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list