forked from GNUsocial/gnu-social
Handle DB_DataObject errors better
We try to handle DB_DataObject errors a little bit better. Previously, they just spit out a cryptic string to the browser with a suggestion to turn on debugging (not a good idea!). So, we catch the error, write the full error message to the log, and then tell users that the can contact the admins if they need to.
This commit is contained in:
@@ -108,22 +108,26 @@ class HTMLOutputter extends XMLOutputter
|
||||
}
|
||||
|
||||
header('Content-Type: '.$type);
|
||||
|
||||
|
||||
$this->extraHeaders();
|
||||
|
||||
$this->startXML('html',
|
||||
'-//W3C//DTD XHTML 1.0 Strict//EN',
|
||||
'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd');
|
||||
|
||||
// FIXME: correct language for interface
|
||||
|
||||
$language = common_language();
|
||||
$language = $this->getLanguage();
|
||||
|
||||
$this->elementStart('html', array('xmlns' => 'http://www.w3.org/1999/xhtml',
|
||||
'xml:lang' => $language,
|
||||
'lang' => $language));
|
||||
}
|
||||
|
||||
function getLanguage()
|
||||
{
|
||||
// FIXME: correct language for interface
|
||||
return common_language();
|
||||
}
|
||||
|
||||
/**
|
||||
* Ends an HTML document
|
||||
*
|
||||
@@ -134,7 +138,7 @@ class HTMLOutputter extends XMLOutputter
|
||||
$this->elementEnd('html');
|
||||
$this->endXML();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* To specify additional HTTP headers for the action
|
||||
*
|
||||
|
Reference in New Issue
Block a user