Skip to content

Commit e50e1f9

Browse files
jalgabaFrederic Delaunay
authored and
Frederic Delaunay
committed
Fix broken sample links on windows due to $baseDir having backslash (PHPOffice#653)
1 parent 6d2d908 commit e50e1f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/PhpSpreadsheet/Helper/Sample.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public function getSamples()
8282

8383
$files = [];
8484
foreach ($regex as $file) {
85-
$file = str_replace($baseDir . '/', '', $file[0]);
85+
$file = str_replace(str_replace('\\', '/', $baseDir) . '/', '', str_replace('\\', '/', $file[0]));
8686
$info = pathinfo($file);
8787
$category = str_replace('_', ' ', $info['dirname']);
8888
$name = str_replace('_', ' ', preg_replace('/(|\.php)/', '', $info['filename']));

0 commit comments

Comments
 (0)