From cd13dd1c674c0494ffce7b725bbf7220093d612a Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sun, 28 Aug 2005 00:11:48 +0000 Subject: [PATCH] Use parse_url() in fetch_arguments() --- includes/paths.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/includes/paths.php b/includes/paths.php index 2fddc12..af5b1d8 100644 --- a/includes/paths.php +++ b/includes/paths.php @@ -193,14 +193,16 @@ class Paths { $return = array(); - if (($pos = strpos($url, '?')) !== false) + $bits = parse_url($url); + + if (isset($bits['query'])) { - $return[0] = substr($url, 0, strlen($url) - $pos + 1); - $return[1] = substr($url, $pos + 1); + $return[0] = $bits['path']; + $return[1] = $bits['query']; } else { - $return[0] = $url; + $return[0] = $bits['path']; $return[1] = ''; } -- 2.22.5