WordPress.org

Make WordPress Core

Ticket #17754: 17754.2.diff

File 17754.2.diff, 414 bytes (added by coffee2code, 7 years ago)

Square bracket syntax, rather than curly

  • 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/**