[wp-trac] [WordPress Trac] #61834: class-wp-site-health-auto-updates.php triggers error when basedir restrictions in effect

WordPress Trac noreply at wordpress.org
Wed Aug 21 22:18:59 UTC 2024


#61834: class-wp-site-health-auto-updates.php triggers error when basedir
restrictions in effect
-------------------------------------+---------------------
 Reporter:  Keffr3n                  |       Owner:  (none)
     Type:  defect (bug)             |      Status:  new
 Priority:  normal                   |   Milestone:  6.7
Component:  Filesystem API           |     Version:  6.6.1
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:
-------------------------------------+---------------------

Comment (by SergeyBiryukov):

 Hi there, thanks for the ticket! I was able to reproduce the issue. For
 anyone testing, note that the warning here may not be displayed on screen
 due to this test being performed via a REST API request, for which
 `display_errors` is off by default in `wp_debug_mode()`, so make sure to
 check the error log.

 Replying to [ticket:61834 Keffr3n]:
 > instead of testing with is_dir, could you test also for access? like
 with is_readable()?

 In my testing, `is_readable()` appears to throw the same warning. However,
 we did resolve a similar issue previously in [55425] / #42619, so we can
 reuse `WP_Automatic_Updater::is_allowed_dir()` here.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/61834#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list