[wp-trac] [WordPress Trac] #35996: wp_normalize_path() not working with DFS on Windows hosting

WordPress Trac noreply at wordpress.org
Tue Mar 8 06:02:25 UTC 2016


#35996: wp_normalize_path() not working with DFS on Windows hosting
--------------------------------------+---------------------
 Reporter:  rilwis                    |       Owner:  dd32
     Type:  defect (bug)              |      Status:  closed
 Priority:  normal                    |   Milestone:  4.5
Component:  Filesystem API            |     Version:  3.9
 Severity:  normal                    |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+---------------------

Comment (by dd32):

 I'd just like to point out that the original code example in the ticket is
 invalid, you shouldn't do this, as it's completely unnecessary (and may
 also break):
 {{{require wp_normalize_path( __DIR__ ) . 'phpinfo.php';}}}

 `wp_normalize_path()` is designed to be used to make two paths "sane" for
 comparison purposes, for example, to remove `ABSPATH` from a filename and
 return the remainder - case differences in the path or extra slashes
 during path concatenation can cause the comparisons to fail otherwise.

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


More information about the wp-trac mailing list