Skip to content

Commit 3b068e7

Browse files
committed
[BUGFIX] Treat numeral filenames as string
Currently pages such as 404.rst cause type errors and fail the application.
1 parent 8e48b79 commit 3b068e7

File tree

5 files changed

+54
-2
lines changed

5 files changed

+54
-2
lines changed

packages/guides/src/FileCollector.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@ public function collect(FilesystemInterface $filesystem, string $directory, stri
6161

6262
$parseQueue = new Files();
6363
foreach ($this->fileInfos as $filename => $_fileInfo) {
64-
if (!$this->doesFileRequireParsing($filename)) {
64+
if (!$this->doesFileRequireParsing((string) $filename)) {
6565
continue;
6666
}
6767

68-
$parseQueue->add($filename);
68+
$parseQueue->add((string) $filename);
6969
}
7070

7171
return $parseQueue;
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<!-- content start -->
2+
<div class="section" id="some-title">
3+
<h1>Some Title</h1>
4+
5+
<p>Lorem Ipsum</p>
6+
</div>
7+
8+
<!-- content end -->
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"std:doc": {
3+
"404": [
4+
"-",
5+
"-",
6+
"404.html",
7+
"Page not found (404)"
8+
],
9+
"index": [
10+
"-",
11+
"-",
12+
"index.html",
13+
"Some Title"
14+
]
15+
},
16+
"std:label": {
17+
"page-not-found-404": [
18+
"-",
19+
"-",
20+
"404.html#page-not-found-404",
21+
"Page not found (404)"
22+
],
23+
"some-title": [
24+
"-",
25+
"-",
26+
"index.html#some-title",
27+
"Some Title"
28+
]
29+
}
30+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
:orphan:
2+
3+
====================
4+
Page not found (404)
5+
====================
6+
7+
The page you were redirected to no longer exists.
8+
9+
To search the entire TYPO3 documentation (https://docs.typo3.org), use the search
10+
box on the top of the page.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Some Title
2+
==========
3+
4+
Lorem Ipsum

0 commit comments

Comments
 (0)