From 901603122feb5ecb73156eae297129a0f18f8d71 Mon Sep 17 00:00:00 2001 From: Christian Schneider Date: Mon, 1 Sep 2014 18:08:37 +0200 Subject: Simplify it_url::parse --- it_url.class | 11 ++++------- 1 file 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; } } -- cgit v1.2.3