Catch Path::join() exceptions in findTemplate() (fixes #9084)

This commit is contained in:
Loz Calver 2019-06-21 09:40:18 +01:00
parent a54ba97e16
commit b1551a687d

View File

@ -218,9 +218,13 @@ class ThemeResourceLoader
foreach ($themePaths as $themePath) {
// Join path
$pathParts = [ $this->base, $themePath, 'templates', $head, $type, $tail ];
$path = Path::join($pathParts) . '.ss';
if (file_exists($path)) {
return $path;
try {
$path = Path::join($pathParts) . '.ss';
if (file_exists($path)) {
return $path;
}
} catch (InvalidArgumentException $e) {
// No-op
}
}
}