Fixed compilation of created pages
This commit is contained in:
bovenliggende
2f5abb8488
commit
01df221476
BIN
daux.phar
BIN
daux.phar
Binair bestand niet weergegeven.
@ -40,7 +40,8 @@ class ContentTypeHandler
|
||||
*/
|
||||
public function getType(Content $node)
|
||||
{
|
||||
$extension = pathinfo($node->getPath(), PATHINFO_EXTENSION);
|
||||
$path = $node->getPath() ?: $node->getName();
|
||||
$extension = pathinfo($path, PATHINFO_EXTENSION);
|
||||
|
||||
foreach ($this->types as $type) {
|
||||
if (in_array($extension, $type->getExtensions())) {
|
||||
@ -48,6 +49,6 @@ class ContentTypeHandler
|
||||
}
|
||||
}
|
||||
|
||||
throw new \RuntimeException("no contentType found for {$node->getPath()}");
|
||||
throw new \RuntimeException("no contentType found for $path");
|
||||
}
|
||||
}
|
||||
|
Laden…
Verwijs in nieuw issue
Block a user