Fixed compilation of created pages
Cette révision appartient à :
Parent
2f5abb8488
révision
01df221476
BIN
daux.phar
BIN
daux.phar
Fichier binaire non affiché.
@ -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");
|
||||
}
|
||||
}
|
||||
|
Chargement…
Référencer dans un nouveau ticket
Block a user