summaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-02-21 11:11:37 -0800
committerBrion Vibber <brion@pobox.com>2010-02-21 11:11:37 -0800
commit3e7a2a4014dd93637f5a666e238dde13e397523c (patch)
tree31c10610162e6b7ef859d45bf5e24c81d284c864 /actions
parent588fe5d603abe40c45a1147eba18c8b5143babc4 (diff)
Fix for doc action on systems that return false for globbing in a non-existing dir
Diffstat (limited to 'actions')
-rw-r--r--actions/doc.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/actions/doc.php b/actions/doc.php
index eaf4b7df2..459f5f096 100644
--- a/actions/doc.php
+++ b/actions/doc.php
@@ -173,6 +173,10 @@ class DocAction extends Action
}
$local = glob(INSTALLDIR.'/local/doc-src/'.$this->title.'.*');
+ if ($local === false) {
+ // Some systems return false, others array(), if dir didn't exist.
+ $local = array();
+ }
if (count($local) || isset($localDef)) {
return $this->negotiateLanguage($local, $localDef);
@@ -183,6 +187,9 @@ class DocAction extends Action
}
$dist = glob(INSTALLDIR.'/doc-src/'.$this->title.'.*');
+ if ($dist === false) {
+ $dist = array();
+ }
if (count($dist) || isset($distDef)) {
return $this->negotiateLanguage($dist, $distDef);