[wp-trac] [WordPress Trac] #48960: failed to open dir: No such file or directory in WIndows

WordPress Trac noreply at wordpress.org
Tue Dec 17 20:37:00 UTC 2019


#48960: failed to open dir: No such file or directory in WIndows
-----------------------------------+-----------------------
 Reporter:  eden159                |       Owner:  azaozz
     Type:  defect (bug)           |      Status:  reopened
 Priority:  normal                 |   Milestone:  5.3.2
Component:  Media                  |     Version:  5.3.1
 Severity:  major                  |  Resolution:
 Keywords:  has-patch fixed-major  |     Focuses:
-----------------------------------+-----------------------

Comment (by azaozz):

 Replying to [comment:19 autotutorial]:

 Thanks for the suggestion but not sure the 7.4/E_WARNING for invalid
 container read array-access is needed here. According to the PHP docs
 `scandir()` returns an array, or `false` on error. We are only interested
 if it is an array (i.e. not false) and if there are any actual file names
 in it.

 It is also limited to only look at the upload dir, which is generally
 always readable/writable, and `scandir()` is silenced in case there are
 any other edge cases/errors.

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


More information about the wp-trac mailing list