]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/doc.php
Fix for doc action on systems that return false for globbing in a non-existing dir
[quix0rs-gnu-social.git] / 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);