Skip to content

Commit a74edca

Browse files
authored
Merge pull request #31 from bradwade/master
Fixing patternTypePath assignment - Undefined variable: pattern in TwigUtil.php on line 65
2 parents fd6d8e2 + 7f5647b commit a74edca

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/PatternLab/PatternEngine/Twig/TwigUtil.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ public static function addPaths($filesystemLoader, $patternSourceDir) {
6161
$finder = new Finder();
6262
$finder->directories()->depth(0)->in($patternSourceDir);
6363
foreach ($finder as $file) {
64-
$patternBits = explode("-",$file->getRelativePathName(),2);
64+
$pattern = $file->getRelativePathName();
65+
$patternBits = explode("-",$pattern,2);
6566
$patternTypePath = (((int)$patternBits[0] != 0) || ($patternBits[0] == '00')) ? $patternBits[1] : $pattern;
6667
$filesystemLoader->addPath($file->getPathName(), $patternTypePath);
6768
}

0 commit comments

Comments
 (0)