aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/event
diff options
context:
space:
mode:
authorTristan Darricau <github@nicofuma.fr>2015-01-10 18:15:19 +0100
committerTristan Darricau <github@nicofuma.fr>2015-01-11 11:28:45 +0100
commit1f4bb2c1495e8d2641abe9606f14281e810feee4 (patch)
tree71c491200fb0c3cfe5f42334093387491c16053e /phpBB/phpbb/event
parent74e8f9bd4e6c55dddb473e1a301d2cae9edb6e50 (diff)
downloadforums-1f4bb2c1495e8d2641abe9606f14281e810feee4.tar
forums-1f4bb2c1495e8d2641abe9606f14281e810feee4.tar.gz
forums-1f4bb2c1495e8d2641abe9606f14281e810feee4.tar.bz2
forums-1f4bb2c1495e8d2641abe9606f14281e810feee4.tar.xz
forums-1f4bb2c1495e8d2641abe9606f14281e810feee4.zip
[ticket/13361] Add tests
PHPBB3-13361
Diffstat (limited to 'phpBB/phpbb/event')
-rw-r--r--phpBB/phpbb/event/kernel_exception_subscriber.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/phpBB/phpbb/event/kernel_exception_subscriber.php b/phpBB/phpbb/event/kernel_exception_subscriber.php
index b6b34675f0..01940a4fa9 100644
--- a/phpBB/phpbb/event/kernel_exception_subscriber.php
+++ b/phpBB/phpbb/event/kernel_exception_subscriber.php
@@ -54,8 +54,6 @@ class kernel_exception_subscriber implements EventSubscriberInterface
*/
public function on_kernel_exception(GetResponseForExceptionEvent $event)
{
- page_header($this->user->lang('INFORMATION'));
-
$exception = $event->getException();
$message = $exception->getMessage();
@@ -67,6 +65,8 @@ class kernel_exception_subscriber implements EventSubscriberInterface
if (!$event->getRequest()->isXmlHttpRequest())
{
+ page_header($this->user->lang('INFORMATION'));
+
$this->template->assign_vars(array(
'MESSAGE_TITLE' => $this->user->lang('INFORMATION'),
'MESSAGE_TEXT' => $message,
@@ -83,7 +83,11 @@ class kernel_exception_subscriber implements EventSubscriberInterface
else
{
$data = array();
- $data['message'] = $message;
+
+ if (!empty($message))
+ {
+ $data['message'] = $message;
+ }
if (defined('DEBUG'))
{