Skip to content

Commit

Permalink
Split Html::displayErrorAndDie to separate display & die.
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierstoval committed Sep 23, 2024
1 parent 2760367 commit 115979f
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/Html.php
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,13 @@ public static function getBackUrl($url_in = "")
*
* @return void
**/
public static function displayErrorAndDie($message, $minimal = false)
public static function displayErrorAndDie($message, $minimal = false): void
{
self::displayError($message, $minimal);
exit();
}

public static function displayError($message, $minimal = false): void
{
/** @var bool $HEADER_LOADED */
global $HEADER_LOADED;
Expand All @@ -722,10 +728,8 @@ public static function displayErrorAndDie($message, $minimal = false)
]);

self::nullFooter();
exit();
}


/**
* Add confirmation on button or link before action
*
Expand Down

0 comments on commit 115979f

Please sign in to comment.