WordPress.org

Make WordPress Core

Ticket #17754: 17754.diff

File 17754.diff, 414 bytes (added by coffee2code, 7 years ago)
  • wp-includes/functions.php

     
    21292129                return true;
    21302130
    21312131        // a path starting with / or \ is absolute; anything else is relative
    2132         return (bool) preg_match('#^[/\\\\]#', $path);
     2132        return ( $path{0} == '/' || $path{0} == '\\' );
    21332133}
    21342134
    21352135/**