Skip to content

Commit

Permalink
Fix broken sample links on windows due to $baseDir having backslash (P…
Browse files Browse the repository at this point in the history
  • Loading branch information
jalgaba authored and Frederic Delaunay committed Oct 29, 2018
1 parent 6d2d908 commit e50e1f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PhpSpreadsheet/Helper/Sample.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public function getSamples()

$files = [];
foreach ($regex as $file) {
$file = str_replace($baseDir . '/', '', $file[0]);
$file = str_replace(str_replace('\\', '/', $baseDir) . '/', '', str_replace('\\', '/', $file[0]));
$info = pathinfo($file);
$category = str_replace('_', ' ', $info['dirname']);
$name = str_replace('_', ' ', preg_replace('/(|\.php)/', '', $info['filename']));
Expand Down

0 comments on commit e50e1f9

Please sign in to comment.