equal
deleted
inserted
replaced
78 function _die($t = '') { |
78 function _die($t = '') { |
79 if(defined('ENANO_HEADERS_SENT')) { |
79 if(defined('ENANO_HEADERS_SENT')) { |
80 ob_clean(); |
80 ob_clean(); |
81 } |
81 } |
82 header('HTTP/1.1 500 Internal Server Error'); |
82 header('HTTP/1.1 500 Internal Server Error'); |
83 $bt = $this->sql_backtrace(); |
83 $bt = $this->latest_query; // $this->sql_backtrace(); |
84 $e = htmlspecialchars(mysql_error()); |
84 $e = htmlspecialchars(mysql_error()); |
85 if($e=='') $e='<none>'; |
85 if($e=='') $e='<none>'; |
86 if(defined('ENANO_CONFIG_FETCHED')) die_semicritical('Database error', '<h3>An error occurred during a database query.</h3><p>'.$t.'<br />Error returned by MySQL: '.$e.'<br />SQL Backtrace:</p><pre>'.$bt.'</pre>'); |
86 if(defined('ENANO_CONFIG_FETCHED')) die_semicritical('Database error', '<h3>An error occurred during a database query.</h3><p>'.$t.'<br />Error returned by MySQL: '.$e.'<br />SQL Backtrace:</p><pre>'.$bt.'</pre>'); |
87 else grinding_halt('Database error', '<h3>An error occurred during a database query.</h3><p>'.$t.'<br />Error returned by MySQL: '.$e.'<br />SQL Backtrace:</p><pre>'.$bt.'</pre>'); |
87 else grinding_halt('Database error', '<h3>An error occurred during a database query.</h3><p>'.$t.'<br />Error returned by MySQL: '.$e.'<br />SQL Backtrace:</p><pre>'.$bt.'</pre>'); |
88 exit; |
88 exit; |