Skip to content

Commit 72cf745

Browse files
committed
Enforce string type for string operations
split: b40122acb6c4acafd4e04ff3cef4f202876eb2cb
1 parent 3da23e3 commit 72cf745

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: Compiler/NodeCompiler/ImportNodeCompiler.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class ImportNodeCompiler extends AbstractNodeCompiler
2323
protected function isPugImport($path)
2424
{
2525
$compiler = $this->getCompiler();
26-
$extension = pathinfo($path, PATHINFO_EXTENSION) ?: '';
26+
$extension = pathinfo((string) $path, PATHINFO_EXTENSION);
2727
$extensions = $compiler->getOption('extensions');
2828

2929
if ($extension === '') {
@@ -72,7 +72,7 @@ public function compileNode(NodeInterface $node, ElementInterface $parent = null
7272

7373
$paths = $isAbsolutePath
7474
? null
75-
: [dirname($compiler->getPath()) ?: '.'];
75+
: [dirname((string) $compiler->getPath()) ?: '.'];
7676

7777
$path = $compiler->resolve($node->getPath(), $paths);
7878
$compiler->registerImportPath($path);

0 commit comments

Comments
 (0)