Просмотр исходного кода

[DomCrawler] fixed DomCrawler::parseUri()

Fabien Potencier 15 лет назад
Родитель
Сommit
e09f730243
1 измененных файлов с 1 добавлено и 1 удалено
  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))
     if ('/' !== substr($path, -1))
     {
     {
-      $path = dirname($path);
+      $path = substr($path, 0, strrpos($path, '/') + 1);
     }
     }
 
 
     return array(preg_replace('#^(.*?//[^/]+)\/.*$#', '$1', $uri), $path);
     return array(preg_replace('#^(.*?//[^/]+)\/.*$#', '$1', $uri), $path);