Browse files

Don't rely on headers_sent

  • Loading branch information...
1 parent 87fa3d4 commit 8ce9ba616d974ab6da83212d82d2e2880efc65f3 @vrana committed Nov 25, 2010
Showing with 2 additions and 1 deletion.
  1. +1 −0 adminer/include/design.inc.php
  2. +1 −1 adminer/include/functions.inc.php
View
1 adminer/include/design.inc.php
@@ -78,6 +78,7 @@ function page_header($title, $error = "", $breadcrumb = array(), $title2 = "") {
if ($error) {
echo "<div class='error'>$error</div>\n";
}
+ define("PAGE_HEADER", 1);
}
/** Print HTML footer
View
2 adminer/include/functions.inc.php
@@ -215,7 +215,7 @@ function get_rows($query, $connection2 = null, $error = "<p class='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;

0 comments on commit 8ce9ba6

Please sign in to comment.