diff options
Diffstat (limited to 'it_url.class')
-rw-r--r-- | it_url.class | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/it_url.class b/it_url.class index e657fd3..3b8f5b0 100644 --- a/it_url.class +++ b/it_url.class @@ -825,15 +825,12 @@ static function _params($params, $keys = null) /** * Convert url into array with base url in $result[0] and GET params - * @param $paramsonly Only return GET params */ -static function parse($url, $paramsonly = false) +static function parse($url) { - list($path, $query) = explode("?", $url); - if ($query) - parse_str($query, $params); - - return ($paramsonly ? array() : array($path)) + (array)$params; + list($path, $query) = explode("?", $url, 2); + parse_str((string)$query, $params); + return (array)$path + (array)$params; } } |