You've already forked phpmyadmin
mirror of
https://github.com/phpmyadmin/phpmyadmin.git
synced 2026-10-28 07:41:55 +03:00
Do not delete session on fatal error
I see no reason why this should be done, the fatal error is used in following cases: * Very early when there is no session (eg. missing extension) * Invalid value for parameters * Invalid invocation like too big request In neither case session removal will do any good. Signed-off-by: Michal Čihař <michal@cihar.com>
This commit is contained in:
@@ -2157,7 +2157,7 @@ class Util
|
||||
}
|
||||
}
|
||||
if ($found_error) {
|
||||
PMA_fatalError($error_message, null, false);
|
||||
PMA_fatalError($error_message);
|
||||
}
|
||||
} // end function
|
||||
|
||||
|
||||
@@ -206,13 +206,10 @@ function PMA_securePath($path)
|
||||
*
|
||||
* @param string $error_message the error message or named error message
|
||||
* @param string|array $message_args arguments applied to $error_message
|
||||
* @param boolean $delete_session whether to delete session cookie
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function PMA_fatalError(
|
||||
$error_message, $message_args = null, $delete_session = true
|
||||
) {
|
||||
function PMA_fatalError($error_message, $message_args = null) {
|
||||
/* Use format string if applicable */
|
||||
if (is_string($message_args)) {
|
||||
$error_message = sprintf($error_message, $message_args);
|
||||
@@ -249,14 +246,6 @@ function PMA_fatalError(
|
||||
$lang = isset($GLOBALS['lang']) ? $GLOBALS['lang'] : 'en';
|
||||
$dir = isset($GLOBALS['text_dir']) ? $GLOBALS['text_dir'] : 'ltr';
|
||||
|
||||
// on fatal errors it cannot hurt to always delete the current session
|
||||
if ($delete_session
|
||||
&& isset($GLOBALS['session_name'])
|
||||
&& isset($_COOKIE[$GLOBALS['session_name']])
|
||||
) {
|
||||
$GLOBALS['PMA_Config']->removeCookie($GLOBALS['session_name']);
|
||||
}
|
||||
|
||||
// Displays the error message
|
||||
include './libraries/error.inc.php';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user