mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[ticket/14039] Use http_exception instead of die()
PHPBB3-14039
This commit is contained in:
parent
afe91fa7d3
commit
100bb8f27c
1 changed files with 3 additions and 2 deletions
|
@ -13,6 +13,7 @@
|
||||||
|
|
||||||
namespace phpbb\install\controller;
|
namespace phpbb\install\controller;
|
||||||
|
|
||||||
|
use phpbb\exception\http_exception;
|
||||||
use phpbb\install\helper\config;
|
use phpbb\install\helper\config;
|
||||||
use Symfony\Component\HttpFoundation\BinaryFileResponse;
|
use Symfony\Component\HttpFoundation\BinaryFileResponse;
|
||||||
use Symfony\Component\HttpFoundation\ResponseHeaderBag;
|
use Symfony\Component\HttpFoundation\ResponseHeaderBag;
|
||||||
|
@ -49,7 +50,7 @@ class archive_download
|
||||||
|
|
||||||
if (!$filename)
|
if (!$filename)
|
||||||
{
|
{
|
||||||
die ('The requested file is not exist.');
|
throw new http_exception(404, 'URL_NOT_FOUND');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->send_response($filename);
|
return $this->send_response($filename);
|
||||||
|
@ -66,7 +67,7 @@ class archive_download
|
||||||
|
|
||||||
if (!$filename)
|
if (!$filename)
|
||||||
{
|
{
|
||||||
die ('The requested file is not exist.');
|
throw new http_exception(404, 'URL_NOT_FOUND');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->send_response($filename);
|
return $this->send_response($filename);
|
||||||
|
|
Loading…
Add table
Reference in a new issue