diff options
author | Marc Alexander <admin@m-a-styles.de> | 2017-10-29 12:49:16 +0100 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2017-10-29 12:49:16 +0100 |
commit | d56e573a8e8a6edf99b389dd228ab5b5c4abe406 (patch) | |
tree | fed2b1b5ee5d20221d6cbdb78595fa0869185525 | |
parent | d0e25f2eed2550f397ed03928e442a91ea2c1739 (diff) | |
parent | 6e86cd9e15241e9d1ce5fc3eaaf3844c155cc3e9 (diff) | |
download | forums-d56e573a8e8a6edf99b389dd228ab5b5c4abe406.tar forums-d56e573a8e8a6edf99b389dd228ab5b5c4abe406.tar.gz forums-d56e573a8e8a6edf99b389dd228ab5b5c4abe406.tar.bz2 forums-d56e573a8e8a6edf99b389dd228ab5b5c4abe406.tar.xz forums-d56e573a8e8a6edf99b389dd228ab5b5c4abe406.zip |
Merge pull request #4950 from Nicofuma/ticket/15357-3.2.x
[ticket/15298] Never suppress exception trace when using CLI
-rw-r--r-- | phpBB/config/default/container/services_console.yml | 1 | ||||
-rw-r--r-- | phpBB/phpbb/console/exception_subscriber.php | 13 |
2 files changed, 2 insertions, 12 deletions
diff --git a/phpBB/config/default/container/services_console.yml b/phpBB/config/default/container/services_console.yml index 697e147d85..a327b74ac4 100644 --- a/phpBB/config/default/container/services_console.yml +++ b/phpBB/config/default/container/services_console.yml @@ -3,7 +3,6 @@ services: class: phpbb\console\exception_subscriber arguments: - '@language' - - '%debug.exceptions%' tags: - { name: kernel.event_subscriber } diff --git a/phpBB/phpbb/console/exception_subscriber.php b/phpBB/phpbb/console/exception_subscriber.php index b920d4abae..b240993203 100644 --- a/phpBB/phpbb/console/exception_subscriber.php +++ b/phpBB/phpbb/console/exception_subscriber.php @@ -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); } |