Skip to content

Commit

Permalink
Fix broken sample links on windows due to $baseDir having backslash (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
jalgaba authored and PowerKiKi committed Sep 28, 2018
1 parent a98d885 commit 9fa8a02
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 9fa8a02

Please sign in to comment.