Merge pull request #9085 from kinglozzer/9084-path-join-exception

Catch Path::join() exceptions in findTemplate() (fixes #9084)
This commit is contained in:
Robbie Averill 2019-09-06 12:00:39 -07:00 committed by GitHub
commit 41a766d135
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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
}
}
}