From 6e86cd9e15241e9d1ce5fc3eaaf3844c155cc3e9 Mon Sep 17 00:00:00 2001 From: Tristan Darricau Date: Sun, 10 Sep 2017 12:54:10 +0200 Subject: [PATCH] [ticket/15298] Never suppress exception trace when using CLI PHPBB3-15298 --- phpBB/config/default/container/services_console.yml | 1 - 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); }