WordPress.org

Make WordPress Core

Changeset 25341


Ignore:
Timestamp:
09/11/2013 03:59:07 AM (8 years ago)
Author:
nacin
Message:

Avoid string offset notices in [25319] (merged as [25324]). Merges [25340] to 3.6.

Location:
branches/3.6
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/3.6

  • branches/3.6/wp-includes/link-template.php

    r25324 r25341  
    22402240
    22412241    $url = trim( $url );
    2242     if ( $url[0] === '/' && $url[1] === '/' )
     2242    if ( substr( $url, 0, 2 ) === '//' )
    22432243        $url = 'http:' . $url;
    22442244
    22452245    if ( 'relative' == $scheme ) {
    22462246        $url = ltrim( preg_replace( '#^\w+://[^/]*#', '', $url ) );
    2247         if ( $url[0] === '/' )
     2247        if ( $url !== '' && $url[0] === '/' )
    22482248            $url = '/' . ltrim($url , "/ \t\n\r\0\x0B" );
    22492249    } else {
Note: See TracChangeset for help on using the changeset viewer.