* List of first level entries
* @var array
*/
- private $list;
+ private $list = array();
/**
* The list iterator
if (!($list = glob("$path/*.md"))) {
$list = glob("$path/*/*.md");
}
- $this->list = array_filter($list, $this->generateFilter($list));
- sort($this->list, SORT_STRING);
+ if ($list) {
+ $this->list = array_filter($list, $this->generateFilter($list));
+ sort($this->list, SORT_STRING);
+ }
$this->repo = $repo;
}