in case of phpunit executions calling header() and exit() is too bad

remotes/origin/ldap_group_count
Thomas Müller 2014-03-14 18:20:33 +07:00
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();
}
/**