Fix some issues caught by HipHop, and work around some issues

caused by HipHop.
This commit is contained in:
epriestley
2011-02-26 20:57:21 -08:00
parent d4bd2b0edd
commit eccc76dae6
20 changed files with 116 additions and 85 deletions

View File

@@ -212,27 +212,22 @@ class AphrontDefaultApplicationConfiguration
'<code>'.phutil_escape_html((string)$ex).'</code>'.
'</div>';
if ($this->getRequest()->isAjax()) {
$dialog = new AphrontDialogView();
$dialog
->setTitle('Exception!')
->setClass('aphront-exception-dialog')
->setUser($this->getRequest()->getUser())
->appendChild($content)
->addCancelButton('/');
$response = new AphrontDialogResponse();
$response->setDialog($dialog);
return $response;
$user = $this->getRequest()->getUser();
if (!$user) {
// If we hit an exception very early, we won't have a user.
$user = new PhabricatorUser();
}
$view = new PhabricatorStandardPageView();
$view->setRequest($this->getRequest());
$view->appendChild($content);
$dialog = new AphrontDialogView();
$dialog
->setTitle('Exception!')
->setClass('aphront-exception-dialog')
->setUser($user)
->appendChild($content)
->addCancelButton('/');
$response = new AphrontWebpageResponse();
$response->setContent($view->render());
$response = new AphrontDialogResponse();
$response->setDialog($dialog);
return $response;
}