mirror of
https://github.com/phpbb/phpbb.git
synced 2025-03-24 01:20:40 +01:00
Merge branch '3.2.x'
This commit is contained in:
commit
7a54b0631d
@ -3,7 +3,6 @@ services:
|
||||
class: phpbb\console\exception_subscriber
|
||||
arguments:
|
||||
- '@language'
|
||||
- '%debug.exceptions%'
|
||||
tags:
|
||||
- { name: kernel.event_subscriber }
|
||||
|
||||
|
@ -29,12 +29,10 @@ class exception_subscriber implements EventSubscriberInterface
|
||||
* Construct method
|
||||
*
|
||||
* @param \phpbb\language\language $language Language object
|
||||
* @param bool $debug Debug mode
|
||||
*/
|
||||
public function __construct(\phpbb\language\language $language, $debug = false)
|
||||
public function __construct(\phpbb\language\language $language)
|
||||
{
|
||||
$this->language = $language;
|
||||
$this->debug = $debug;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -52,14 +50,7 @@ class exception_subscriber implements EventSubscriberInterface
|
||||
$parameters = array_merge(array($original_exception->getMessage()), $original_exception->get_parameters());
|
||||
$message = call_user_func_array(array($this->language, 'lang'), $parameters);
|
||||
|
||||
if ($this->debug)
|
||||
{
|
||||
$exception = new \RuntimeException($message , $original_exception->getCode(), $original_exception);
|
||||
}
|
||||
else
|
||||
{
|
||||
$exception = new \RuntimeException($message , $original_exception->getCode());
|
||||
}
|
||||
$exception = new \RuntimeException($message , $original_exception->getCode(), $original_exception);
|
||||
|
||||
$event->setException($exception);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user