Don't rely on headers_sent
This commit is contained in:
parent
87fa3d45d7
commit
8ce9ba616d
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue