Skip to content

Commit

Permalink
[ticket/477] Expect version_helper to throw RuntimeException
Browse files Browse the repository at this point in the history
B3P-477
  • Loading branch information
marc1706 committed Feb 26, 2015
1 parent 9551290 commit 53eb8eb
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion includes/version_check.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,15 @@ public function check($return_version = false)

$this->version_helper->force_stability(($this->config['extension_force_unstable'] || !$this->version_helper->is_stable($this->current_version)) ? 'unstable' : null);

$updates = $this->version_helper->get_suggested_updates(true);
// Expect version_helper to throw RuntimeExceptions
try
{
$updates = $this->version_helper->get_suggested_updates(true);
}
catch (\RuntimeException $e)
{
return false;
}

// Return version if $return_version is set to true
if ($return_version)
Expand Down

0 comments on commit 53eb8eb

Please sign in to comment.