projects
/
mdref
/
mdref
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
github
raw
|
patch
|
inline
| side by side (parent:
bdbeb01
)
glob returns false on openshift
author
Michael Wallner
<mike@php.net>
Tue, 14 Oct 2014 16:39:26 +0000
(18:39 +0200)
committer
Michael Wallner
<mike@php.net>
Tue, 14 Oct 2014 16:39:26 +0000
(18:39 +0200)
mdref/Tree.php
patch
|
blob
|
history
diff --git
a/mdref/Tree.php
b/mdref/Tree.php
index d9e2b0db2149221b82e99d65fb43c4bddce90adb..dd27d6fd0f94ca8616031f1127a3d14a38f0ac59 100644
(file)
--- a/
mdref/Tree.php
+++ b/
mdref/Tree.php
@@
-13,7
+13,7
@@
class Tree implements \RecursiveIterator {
* List of first level entries
* @var array
*/
* List of first level entries
* @var array
*/
- private $list;
+ private $list
= array()
;
/**
* The list iterator
/**
* The list iterator
@@
-29,8
+29,10
@@
class Tree implements \RecursiveIterator {
if (!($list = glob("$path/*.md"))) {
$list = glob("$path/*/*.md");
}
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;
}
$this->repo = $repo;
}