Browse Source

[DomCrawler] fixed DomCrawler::parseUri()

Fabien Potencier 15 years ago
parent
commit
e09f730243
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/Symfony/Components/DomCrawler/Crawler.php

+ 1 - 1
src/Symfony/Components/DomCrawler/Crawler.php

@@ -613,7 +613,7 @@ class Crawler extends \SplObjectStorage
 
     if ('/' !== substr($path, -1))
     {
-      $path = dirname($path);
+      $path = substr($path, 0, strrpos($path, '/') + 1);
     }
 
     return array(preg_replace('#^(.*?//[^/]+)\/.*$#', '$1', $uri), $path);