Make WordPress Core

Changeset 26246


Ignore:
Timestamp:
11/18/2013 03:32:47 PM (11 years ago)
Author:
SergeyBiryukov
Message:

Normalize slashes in WP_Filesystem_MockFS::mkdir() and WP_Filesystem_MockFS::locate_parent_node() to avoid an infinite loop on Windows.

fixes #26091.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/includes/mock-fs.php

    r25053 r26246  
    8282     */
    8383    private function locate_parent_node( $path ) {
    84         return $this->locate_node( trailingslashit( dirname( $path ) ) );
     84        $dirname = str_replace( '\\', '/', dirname( $path ) );
     85        return $this->locate_node( trailingslashit( $dirname ) );
    8586    }
    8687
     
    9293        $parent_node = $this->locate_parent_node( $path );
    9394        if ( ! $parent_node ) {
    94             $this->mkdir( dirname( $path ) );
     95            $dirname = str_replace( '\\', '/', dirname( $path ) );
     96            $this->mkdir( $dirname );
    9597            $parent_node = $this->locate_parent_node( $path );
    9698            if ( ! $parent_node )
Note: See TracChangeset for help on using the changeset viewer.