1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-20 23:41:29 +02:00

[ticket/13556] Fix exception translation with filedownloader

PHPBB3-13556
This commit is contained in:
Joas Schilling
2015-01-30 18:02:04 +01:00
parent e5f2eee167
commit 69450c7152
2 changed files with 6 additions and 5 deletions

View File

@@ -257,9 +257,10 @@ class version_helper
try {
$info = $this->file_downloader->get($this->host, $this->path, $this->file);
}
catch (\RuntimeException $exception)
catch (\phpbb\exception\runtime_exception $exception)
{
throw new \RuntimeException($this->user->lang($exception->getMessage()));
$prepare_parameters = array_merge(array($exception->getMessage()), $exception->get_parameters());
throw new \RuntimeException(call_user_func_array(array($this->user, 'lang'), $prepare_parameters));
}
$error_string = $this->file_downloader->get_error_string();