GitHost.io will be shut down on June 1, 2019. At that point this instance will be unreachable and all data will be irrevocably deleted. More details at https://about.gitlab.com/gitlab-hosted/#githost-is-shutting-down-on-june-1st-2019

Commit 3e7a2a40 authored by Brion Vibber's avatar Brion Vibber

Fix for doc action on systems that return false for globbing in a non-existing dir

parent 588fe5d6
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment