Explorar o código

[DomCrawler] fixed DomCrawler::parseUri()

Fabien Potencier %!s(int64=15) %!d(string=hai) anos
pai
achega
e09f730243
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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);