Make WordPress Core

Changeset 25340 for trunk/src


Ignore:
Timestamp:
09/11/2013 03:57:00 AM (11 years ago)
Author:
nacin
Message:

Avoid string offset notices in [25319].

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/link-template.php

    r25327 r25340  
    22942294
    22952295    $url = trim( $url );
    2296     if ( $url[0] === '/' && $url[1] === '/' )
     2296    if ( substr( $url, 0, 2 ) === '//' )
    22972297        $url = 'http:' . $url;
    22982298
    22992299    if ( 'relative' == $scheme ) {
    23002300        $url = ltrim( preg_replace( '#^\w+://[^/]*#', '', $url ) );
    2301         if ( $url[0] === '/' )
     2301        if ( $url !== '' && $url[0] === '/' )
    23022302            $url = '/' . ltrim($url , "/ \t\n\r\0\x0B" );
    23032303    } else {
Note: See TracChangeset for help on using the changeset viewer.