8000 bug #13693 [HttpKernel] Fixed DumpDataCollector: dump.name for Window… · symfony/symfony@42e6540 · GitHub
[go: up one dir, main page]

Skip to content

Commit 42e6540

Browse files
committed
bug #13693 [HttpKernel] Fixed DumpDataCollector: dump.name for Windows file paths (King2500)
This PR was merged into the 2.6 branch. Discussion ---------- [HttpKernel] Fixed DumpDataCollector: dump.name for Windows file paths | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes? | Fixed tickets | | License | MIT | Doc PR | When using VarDumper on Windows files, the automatic "dump.name" generated wrong names. `dump()` call in: ``` F:\HtDocs\demo\src\Acme\Controller\DemoController.php ``` Displayed: ``` dump() in :\HtDocs\demo\src\Acme\Controller\DemoController.php line 35 ``` Expected result is: ``` dump() in DemoController.php line 35 ``` The existing code in line 118 didn't use the variable from the previous line. Commits ------- a025dea Fix dump.name for Windows file paths
2 parents ce00962 + a025dea commit 42e6540

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/HttpKernel/DataCollector/DumpDataCollector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public function dump(Data $data)
115115

116116
if (false === $name) {
117117
$name = strtr($file, '\\', '/');
118-
$name = substr($file, strrpos($file, '/') + 1);
118+
$name = substr($name, strrpos($name, '/') + 1);
119119
}
120120

121121
$this->data[] = compact('data', 'name', 'file', 'line', 'fileExcerpt');

0 commit comments

Comments
 (0)
0