File tree 1 file changed +7
-2
lines changed
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,11 @@ public function __construct(DocFile $file)
65
65
$ this ->config = $ this ->file ->getManager ()->getConfiguration ();
66
66
}
67
67
68
+ public function getConfig (): DocsConfig
69
+ {
70
+ return $ this ->config ;
71
+ }
72
+
68
73
private function parse () : void
69
74
{
70
75
if (isset ($ this ->html )) {
@@ -219,7 +224,7 @@ private function preParseInjectIncludes(string $text) : string
219
224
public function findIncludeFile (string $ relativePath ) : FileInfo
220
225
{
221
226
// Disallow navigating upwards with "../"
222
- if (strpos ($ relativePath , '.. ' )) {
227
+ if (strpos ($ relativePath , '.. ' ) !== false ) {
223
228
throw new DocsException (
224
229
'Navigating upwards from include folders is not allowed. ' ,
225
230
'' ,
@@ -231,7 +236,7 @@ public function findIncludeFile(string $relativePath) : FileInfo
231
236
232
237
if (!in_array ($ ext , $ this ->config ->getIncludeExtensions (), true )) {
233
238
throw new DocsException (
234
- sprintf ('The extension %s is not allowed. ' , $ ext ),
239
+ sprintf ('The extension [%s] is not allowed. ' , $ ext ),
235
240
'' ,
236
241
self ::ERROR_INVALID_INCLUDE_EXTENSION
237
242
);
You can’t perform that action at this time.
0 commit comments