Make WordPress Core

Ticket #48289: 48289.3.diff

File 48289.3.diff, 457 bytes (added by itowhid06, 5 years ago)

updated the regex

  • src/wp-includes/functions.php

    diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php
    index 979536f751..d0cfa6a8db 100644
    a b function path_is_absolute( $path ) { 
    19881988        }
    19891989
    19901990        // Windows allows absolute paths like this.
    1991         if ( preg_match( '#^[a-zA-Z]:\\\\#', $path ) ) {
     1991        if ( '/' !== DIRECTORY_SEPARATOR && preg_match ( '~\A[A-Z]:(?![^/\\\\])~i', $path ) ) {
    19921992                return true;
    19931993        }
    19941994