Check for sent headers, provide backtrace in this case.

This commit is contained in:
Michal Čihař
2006-10-10 14:06:56 +00:00
parent f741e2eb76
commit 2b5baa6e9a
2 changed files with 10 additions and 0 deletions

View File

@@ -10,6 +10,8 @@ $Source$
* libraries/import.lib.php: Correctly fail if file is too short (bug
#1574340).
* libraries/db_table_exists.lib.php: Fix displaying of entered query.
* libraries/common.lib.php: Check for sent headers, provide backtrace in
this case.
2006-10-09 Michal Čihař <michal@cihar.com>
* lang/german: Fix typo (translation #1570611).

View File

@@ -928,6 +928,14 @@ if (!defined('PMA_MINIMUM_COMMON')) {
}
} else {
session_write_close();
if (headers_sent()) {
if (function_exists(debug_print_backtrace)) {
echo '<pre>';
debug_print_backtrace();
echo '</pre>';
}
trigger_error('PMA_sendHeaderLocation called when headers are already sent!', E_USER_ERROR);
}
// bug #1523784: IE6 does not like 'Refresh: 0', it
// results in a blank page
// but we need it when coming from the cookie login panel)