diff --git a/daux.phar b/daux.phar index a62cc9f..1ec4ccd 100755 Binary files a/daux.phar and b/daux.phar differ diff --git a/libs/ContentTypes/ContentTypeHandler.php b/libs/ContentTypes/ContentTypeHandler.php index c86f62f..639d740 100644 --- a/libs/ContentTypes/ContentTypeHandler.php +++ b/libs/ContentTypes/ContentTypeHandler.php @@ -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"); } }