Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

* When no path, corrected to default to no path

git-svn-id: http://svn.php.net/repository/pear/packages/Net_URL/trunk@82397 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information...
commit 9e4611ed1a4e46308e42a810a8d0a957db2a6766 1 parent 423e46e
Richard Heyes authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 URL.php
View
7 URL.php
@@ -135,7 +135,9 @@ function Net_URL($url = null)
$path = dirname($this->path) == '/' ? '' : dirname($this->path);
$this->path = sprintf('%s/%s', $path, $urlinfo['path']);
}
- }
+ } else {
+ $this->path = '';
+ }
// Querystring
$this->querystring = !empty($urlinfo['query']) ? $this->_parseRawQueryString($urlinfo['query']) : array();
@@ -243,4 +245,7 @@ function _parseRawQuerystring($querystring)
return $qs;
}
}
+
+$u = new Net_URL('../www.example.com');
+echo $u->getUrl();
?>
Please sign in to comment.
Something went wrong with that request. Please try again.