File: phpbb/event/kernel_exception_subscriber.php
Unmodified
Added
Modified
Removed
Line 33 | Line 33 |
---|
* @var \phpbb\user */ protected $user;
|
* @var \phpbb\user */ protected $user;
|
| /** @var \phpbb\request\type_cast_helper */ protected $type_caster;
|
/** * Construct method
| /** * Construct method
|
Line 44 | Line 47 |
---|
{ $this->template = $template; $this->user = $user;
|
{ $this->template = $template; $this->user = $user;
|
| $this->type_caster = new \phpbb\request\type_cast_helper();
|
}
/**
| }
/**
|
Line 57 | Line 61 |
---|
$exception = $event->getException();
$message = $exception->getMessage();
|
$exception = $event->getException();
$message = $exception->getMessage();
|
| $this->type_caster->set_var($message, $message, 'string', true, false);
|
if ($exception instanceof \phpbb\exception\exception_interface) { $message = call_user_func_array(array($this->user, 'lang'), array_merge(array($message), $exception->get_parameters())); }
|
if ($exception instanceof \phpbb\exception\exception_interface) { $message = call_user_func_array(array($this->user, 'lang'), array_merge(array($message), $exception->get_parameters())); }
|
| // Show <strong> text in bold $message = preg_replace('#<(/?strong)>#i', '<$1>', $message);
|
if (!$event->getRequest()->isXmlHttpRequest()) {
| if (!$event->getRequest()->isXmlHttpRequest()) {
|