aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/phpbb')
-rw-r--r--phpBB/phpbb/version_helper.php16
1 files changed, 5 insertions, 11 deletions
diff --git a/phpBB/phpbb/version_helper.php b/phpBB/phpbb/version_helper.php
index 8e1c593094..4718088ab6 100644
--- a/phpBB/phpbb/version_helper.php
+++ b/phpBB/phpbb/version_helper.php
@@ -215,19 +215,10 @@ class version_helper
if ($this->force_stability !== null)
{
- $stability = ($this->force_stability === 'unstable') ? 'unstable' : 'stable';
- }
- else
- {
- $stability = $this->is_stable($this->current_version) ? 'stable' : 'unstable';
- }
-
- if (!isset($info[$stability]))
- {
- return array();
+ return ($this->force_stability === 'unstable') ? $info['unstable'] : $info['stable'];
}
- return $info[$stability];
+ return ($this->is_stable($this->current_version)) ? $info['stable'] : $info['unstable'];
}
/**
@@ -271,6 +262,9 @@ class version_helper
}
}
+ $info['stable'] = (empty($info['stable'])) ? array() : $info['stable'];
+ $info['unstable'] = (empty($info['unstable'])) ? $info['stable'] : $info['unstable'];
+
$this->cache->put($cache_file, $info, 86400); // 24 hours
}