equal
deleted
inserted
replaced
666 * doesn't exist in the given URL; a string or - in the case of |
666 * doesn't exist in the given URL; a string or - in the case of |
667 * PHP_URL_PORT - integer when it does. See parse_url()'s return values. |
667 * PHP_URL_PORT - integer when it does. See parse_url()'s return values. |
668 */ |
668 */ |
669 function wp_parse_url( $url, $component = -1 ) { |
669 function wp_parse_url( $url, $component = -1 ) { |
670 $to_unset = array(); |
670 $to_unset = array(); |
671 $url = strval( $url ); |
671 $url = (string) $url; |
672 |
672 |
673 if ( '//' === substr( $url, 0, 2 ) ) { |
673 if ( '//' === substr( $url, 0, 2 ) ) { |
674 $to_unset[] = 'scheme'; |
674 $to_unset[] = 'scheme'; |
675 $url = 'placeholder:' . $url; |
675 $url = 'placeholder:' . $url; |
676 } elseif ( '/' === substr( $url, 0, 1 ) ) { |
676 } elseif ( '/' === substr( $url, 0, 1 ) ) { |