in case of phpunit executions calling header() and exit() is too bad
This commit is contained in:
parent
fe05c0c81b
commit
bbbbb033f3
1 changed files with 8 additions and 3 deletions
|
@ -367,9 +367,14 @@ class Helper {
|
|||
$post = 0;
|
||||
if(count($_POST) > 0) {
|
||||
$post = 1;
|
||||
}
|
||||
header('Location: ' . $location . '?p=' . $post . '&errorCode=' . $errorCode);
|
||||
exit();
|
||||
}
|
||||
|
||||
if(defined('PHPUNIT_RUN') and PHPUNIT_RUN) {
|
||||
throw new \Exception("Encryption error: $errorCode");
|
||||
}
|
||||
|
||||
header('Location: ' . $location . '?p=' . $post . '&errorCode=' . $errorCode);
|
||||
exit();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue