1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-08 15:47:00 +02:00

Turn on output buffering only after sending headers

Otherwise output sent before Location (usually errors) is lost.
This commit is contained in:
Jakub Vrana
2025-03-24 14:02:01 +01:00
parent cd53c54b6a
commit b86a9cb5fb

View File

@@ -1,10 +1,6 @@
<?php <?php
namespace Adminer; namespace Adminer;
if (!ob_get_level()) {
ob_start(null, 4096);
}
/** Print HTML header /** Print HTML header
* @param string used in title, breadcrumb and heading, should be HTML escaped * @param string used in title, breadcrumb and heading, should be HTML escaped
* @param string * @param string
@@ -19,6 +15,9 @@ function page_header($title, $error = "", $breadcrumb = array(), $title2 = "") {
page_messages($error); page_messages($error);
exit; exit;
} }
if (!ob_get_level()) {
ob_start(null, 4096);
}
$title_all = $title . ($title2 != "" ? ": $title2" : ""); $title_all = $title . ($title2 != "" ? ": $title2" : "");
$title_page = strip_tags($title_all . (SERVER != "" && SERVER != "localhost" ? h(" - " . SERVER) : "") . " - " . $adminer->name()); $title_page = strip_tags($title_all . (SERVER != "" && SERVER != "localhost" ? h(" - " . SERVER) : "") . " - " . $adminer->name());
// initial-scale=1 is the default but Chrome 134 on iOS is not able to zoom out without it // initial-scale=1 is the default but Chrome 134 on iOS is not able to zoom out without it