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'; + return ($this->force_stability === 'unstable') ? $info['unstable'] : $info['stable']; } - if (!isset($info[$stability])) - { - return array(); - } - - 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 }