]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Fix for doc action on systems that return false for globbing in a non-existing dir
authorBrion Vibber <brion@pobox.com>
Sun, 21 Feb 2010 19:11:37 +0000 (11:11 -0800)
committerBrion Vibber <brion@pobox.com>
Sun, 21 Feb 2010 19:11:37 +0000 (11:11 -0800)
actions/doc.php

index eaf4b7df2d8f0b62365b718cca266ffe572ac1f8..459f5f09683ca013af2ffa7335fd06b4fb7a9f4c 100644 (file)
@@ -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);