Skip to content

Commit

Permalink
Allow "empty" filesystem loader extension.
Browse files Browse the repository at this point in the history
Fixes #123
  • Loading branch information
bobthecow committed Nov 28, 2012
1 parent 1560863 commit 042d537
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Mustache/Loader/FilesystemLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,12 @@ public function __construct($baseDir, array $options = array())
throw new RuntimeException('FilesystemLoader baseDir must be a directory: '.$baseDir);
}

if (isset($options['extension'])) {
$this->extension = '.' . ltrim($options['extension'], '.');
if (array_key_exists('extension', $options)) {
if (empty($options['extension'])) {
$this->extension = '';
} else {
$this->extension = '.' . ltrim($options['extension'], '.');
}
}
}

Expand Down

0 comments on commit 042d537

Please sign in to comment.