note 107404 modified in function.http-build-url by danbrown

From: Date: Thu, 10 May 2012 21:18:28 +0000
Subject: note 107404 modified in function.http-build-url by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-187872@lists.php.net to get a copy of this message
Although I've never used this function, based on the documentation it seems that the above code should also include the following:

<?php
	if ( ! is_array( $url ) ) // Added - Randy
	// Parse the original URL
		$parse_url = parse_url($url);
		
// allow parts to be a url Added - Randy
	if ( ! is_array( $parts ) )
		$parts = parse_url( $parts );
?> --was-- Although I've never used this function, based on the documentation it seems that the above code should also include the following: if ( ! is_array( $url ) ) // Added - Randy // Parse the original URL $parse_url = parse_url($url); // allow parts to be a url Added - Randy if ( ! is_array( $parts ) ) $parts = parse_url( $parts ); http://php.net/manual/en/function.http-build-url.php

« previous php.notes (#187872) next »