Skip to content

Commit 2baac73

Browse files
authored
Merge pull request phpbb#6851 from iMattPro/ticket/17542
[ticket/17542] Throw an exception at the exit_handler instead
2 parents 243c67a + a37fb9a commit 2baac73

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/mock/event_dispatcher.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,11 @@ public function __construct()
2525
public function trigger_event($eventName, $data = array()): array
2626
{
2727
$data = (array) $data;
28-
28+
29+
// Throw an exception if we reach the core's exit_handler()
2930
if ($eventName === 'core.exit_handler')
3031
{
31-
$data['exit_handler_override'] = true;
32+
throw new \RuntimeException('Exit handler called');
3233
}
3334

3435
return $data;

0 commit comments

Comments
 (0)