diff options
Diffstat (limited to 'phpBB/phpbb/version_helper.php')
-rw-r--r-- | phpBB/phpbb/version_helper.php | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/phpBB/phpbb/version_helper.php b/phpBB/phpbb/version_helper.php index d7f1f02678..38050d8ad7 100644 --- a/phpBB/phpbb/version_helper.php +++ b/phpBB/phpbb/version_helper.php @@ -254,9 +254,6 @@ class version_helper } else if ($info === false || $force_update) { - $errstr = $errno = ''; - $this->file_downloader->set_error_number($errno) - ->set_error_string($errstr); try { $info = $this->file_downloader->get($this->host, $this->path, $this->file); } @@ -264,10 +261,11 @@ class version_helper { throw new \RuntimeException(call_user_func_array(array($this->user, 'lang'), $exception->getMessage())); } + $error_string = $this->file_downloader->get_error_string(); - if (!empty($errstr)) + if (!empty($error_string)) { - throw new \RuntimeException($errstr); + throw new \RuntimeException($error_string); } $info = json_decode($info, true); |