diff --git a/adminer/include/design.inc.php b/adminer/include/design.inc.php index 464c931a..dfad385a 100644 --- a/adminer/include/design.inc.php +++ b/adminer/include/design.inc.php @@ -78,6 +78,7 @@ function page_header($title, $error = "", $breadcrumb = array(), $title2 = "") { if ($error) { echo "
$error
\n"; } + define("PAGE_HEADER", 1); } /** Print HTML footer diff --git a/adminer/include/functions.inc.php b/adminer/include/functions.inc.php index 2c62d12c..ded6952b 100644 --- a/adminer/include/functions.inc.php +++ b/adminer/include/functions.inc.php @@ -215,7 +215,7 @@ function get_rows($query, $connection2 = null, $error = "

") { while ($row = $result->fetch_assoc()) { $return[] = $row; } - } elseif (!$result && $error && (headers_sent() || ob_get_level())) { + } elseif (!$result && $error && defined("PAGE_HEADER")) { echo $error . error() . "\n"; } return $return;