diff -r 32a43ae3649b -r 645727469415 includes/dbal.php
--- a/includes/dbal.php Sun Apr 19 18:35:35 2009 -0400
+++ b/includes/dbal.php Sun Apr 19 18:42:21 2009 -0400
@@ -83,10 +83,14 @@
}
function _die($t = '') {
- if(defined('ENANO_HEADERS_SENT')) {
+ if ( defined('ENANO_HEADERS_SENT') )
+ {
ob_clean();
}
- header('HTTP/1.1 500 Internal Server Error');
+
+ if ( !headers_sent() )
+ header('HTTP/1.1 500 Internal Server Error');
+
$bt = $this->latest_query; // $this->sql_backtrace();
$e = htmlspecialchars(mysql_error());
if($e=='') $e='<none>';
@@ -99,6 +103,15 @@
Error returned by MySQL extension: ' . $e . '
Most recent SQL query:
'.$bt.''; + if ( defined('IN_ENANO_INSTALL') && is_object(@$GLOBALS['ui']) ) + { + global $ui; + echo '