|
cvs: pear /Net_URL URL.php: msg#00639php.cvs.pear
shane Sat Sep 28 19:51:58 2002 EDT Modified files: /pear/Net_URL URL.php Log: fix net_url to handle unmatched query strings, such as http://nagoya.apache.org:5049/axis/services/echoA?wsdl Index: pear/Net_URL/URL.php diff -u pear/Net_URL/URL.php:1.15 pear/Net_URL/URL.php:1.16 --- pear/Net_URL/URL.php:1.15 Thu Sep 5 10:07:42 2002 +++ pear/Net_URL/URL.php Sat Sep 28 19:51:58 2002 @@ -121,7 +121,7 @@ $this->host = !empty($host) ? $host : (isset($HTTP_SERVER_VARS['SERVER_NAME']) ? $HTTP_SERVER_VARS['SERVER_NAME'] : 'localhost'); $this->port = !empty($port) ? $port : (isset($HTTP_SERVER_VARS['SERVER_PORT']) ? $HTTP_SERVER_VARS['SERVER_PORT'] : 80); $this->path = $HTTP_SERVER_VARS['PHP_SELF']; - $this->querystring = $this->_parseRawQuerystring($HTTP_SERVER_VARS['QUERY_STRING']); + $this->querystring = isset($HTTP_SERVER_VARS['QUERY_STRING'])?$this->_parseRawQuerystring($HTTP_SERVER_VARS['QUERY_STRING']):''; $this->anchor = ''; // Parse the uri and store the various parts @@ -241,7 +241,7 @@ */ function getQueryString() { - if (!empty($this->querystring)) { + if (is_array($this->querystring)) { foreach ($this->querystring as $name => $value) { if (is_array($value)) { foreach ($value as $k => $v) { @@ -253,7 +253,7 @@ } $querystring = implode('&', $querystring); } else { - $querystring = ''; + $querystring = $this->querystring; } return $querystring; @@ -270,6 +270,7 @@ { parse_str($querystring, $qs); + if (!$qs) return $querystring; foreach ($qs as $key => $value) { if (is_array($value)) { foreach ($value as $k => $v) { -- PEAR CVS Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | cvs: php4 /pear/scripts php-config.in: 00639, Stig Bakken |
|---|---|
| Next by Date: | cvs: pear /Net_URL URL.php: 00639, Shane Caraveo |
| Previous by Thread: | cvs: pear /Net_URL URL.phpi: 00639, Richard Heyes |
| Next by Thread: | RE: cvs: pear /Net_URL URL.php: 00639, Richard Heyes |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |