mirror of
https://github.com/phpbb/phpbb.git
synced 2025-10-05 20:21:53 +02:00
Merge pull request #6851 from iMattPro/ticket/17542
[ticket/17542] Throw an exception at the exit_handler instead
This commit is contained in:
@@ -25,10 +25,11 @@ class phpbb_mock_event_dispatcher extends \phpbb\event\dispatcher
|
|||||||
public function trigger_event($eventName, $data = array()): array
|
public function trigger_event($eventName, $data = array()): array
|
||||||
{
|
{
|
||||||
$data = (array) $data;
|
$data = (array) $data;
|
||||||
|
|
||||||
|
// Throw an exception if we reach the core's exit_handler()
|
||||||
if ($eventName === 'core.exit_handler')
|
if ($eventName === 'core.exit_handler')
|
||||||
{
|
{
|
||||||
$data['exit_handler_override'] = true;
|
throw new \RuntimeException('Exit handler called');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $data;
|
return $data;
|
||||||
|
Reference in New Issue
Block a user