wp/wp-includes/http.php
changeset 18 be944660c56a
parent 16 a86126ab1dd4
child 19 3d72ae0968f4
equal deleted inserted replaced
17:34716fd837a4 18:be944660c56a
   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 ) ) {