Fixed false trigger_error() after redirect.

Resolves #814.
This commit is contained in:
TimZ99 2019-12-03 00:34:01 +01:00
parent a53fc2a53e
commit 24ee6d02c4
No known key found for this signature in database
GPG Key ID: 4D8268DC68E8339D
4 changed files with 5 additions and 5 deletions

View File

@ -77,7 +77,7 @@ if (!defined('PSM_INSTALL') || !PSM_INSTALL) {
if ($db->getDbHost() === null) {
// no config file has been loaded, redirect the user to the install
header('Location: install.php');
trigger_error("Could not load config file. Redirect to install failed, <a href=\"install.php\">click here</a>.", E_USER_ERROR);
die();
}
// config file has been loaded, check if we have a connection
if (!$db->status()) {
@ -87,7 +87,7 @@ if (!defined('PSM_INSTALL') || !PSM_INSTALL) {
if (!psm_load_conf()) {
// unable to load from config table
header('Location: install.php');
trigger_error("Could not load config table. Redirect to install failed, <a href=\"install.php\">click here</a>.", E_USER_ERROR);
die();
}
// config load OK, make sure database version is up to date
$installer = new \psm\Util\Install\Installer($db);

View File

@ -226,7 +226,7 @@ class ConfigController extends AbstractController {
if ($language_refresh) {
header('Location: '.psm_build_url(array('mod' => 'config'), true, false));
trigger_error("Redirect failed.", E_USER_ERROR);
die();
}
if (isset($_POST['general_submit'])) {

View File

@ -46,7 +46,7 @@ class UpdateController extends AbstractController {
header('Location: '.psm_build_url(array(
'mod' => 'server_status'
), true, false));
trigger_error("Redirect failed.", E_USER_ERROR);
die();
}
}

View File

@ -56,7 +56,7 @@ class LoginController extends AbstractController {
if ($result) {
// success login, redirect
header('Location: '.psm_build_url($_SERVER['QUERY_STRING']));
trigger_error("Redirect failed.", E_USER_ERROR);
die();
} else {
$this->addMessage(psm_get_lang('login', 'error_login_incorrect'), 'error');
}