Permalink
Browse files

fixed a notice

git-svn-id: http://svn.php.net/repository/pear/packages/Stream_Var/trunk@171720 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information...
1 parent d0c30be commit 8487cf6ab2e80b4bdf49db9fa20be87e89e2508d Stephan Schmidt committed Oct 31, 2004
Showing with 7 additions and 3 deletions.
  1. +6 −2 Var.php
  2. +1 −1 examples/example_dir.php
View
@@ -325,8 +325,12 @@ function dir_opendir($path, $options)
{
$url = parse_url($path);
- $scope = $url["host"];
- $varpath = substr($url["path"], 1);
+ $scope = $url['host'];
+ if (isset($url['path'])) {
+ $varpath = substr($url['path'], 1);
+ } else {
+ $varpath = '';
+ }
if (!$status = $this->_setPointer($scope, $varpath))
return false;
View
@@ -1,5 +1,5 @@
<?PHP
- require_once 'Stream/Var.php';
+ require_once '../Var.php';
stream_wrapper_register( "var", "Stream_Var" );
$dirname = 'var://_SERVER';

0 comments on commit 8487cf6

Please sign in to comment.