[wp-trac] [WordPress Trac] #33058: $wp_filesystem->exists('') returns a wrong answer (when FS_METHOD='ftpext').

WordPress Trac noreply at wordpress.org
Mon Mar 13 23:48:44 UTC 2023


#33058: $wp_filesystem->exists('') returns a wrong answer (when
FS_METHOD='ftpext').
-----------------------------------------------+---------------------
 Reporter:  Zdrobau                            |       Owner:  (none)
     Type:  defect (bug)                       |      Status:  new
 Priority:  normal                             |   Milestone:  6.3
Component:  Filesystem API                     |     Version:  2.5
 Severity:  normal                             |  Resolution:
 Keywords:  has-patch has-testing-info commit  |     Focuses:
-----------------------------------------------+---------------------

Comment (by pbiron):

 Replying to [comment:17 azaozz]:
 > Replying to [comment:16 costdev]:
 > > this change is a simple guard and doesn't employ any FTP functionality
 >
 > Wondering if any of these methods support the
 [https://en.wikipedia.org/wiki/List_of_FTP_commands FTP command] `CWD`? If
 yes, seems an empty `exists()` may be expected to return true as it will
 be checking the current working directory?

 Thanx for looking at this @azaozz .  The point of this ticket is that the
 current behavior of `::exists('')` for the FTP filesytems is different
 than that for the `direct` filesystem.

 And that incongruity could cause problems (not likely for core's use of
 the filesystem classes, but for extenders' uses).

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


More information about the wp-trac mailing list