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

@@ -69,14 +69,10 @@ class PhabricatorRepositoryCreateController extends PhabricatorController {
return id(new AphrontRedirectResponse())
->setURI('/repository/edit/'.$repository->getID().'/');
} catch (PhabricatorQueryDuplicateKeyException $ex) {
if ($ex->getDuplicateKey() == 'callsign') {
$e_callsign = 'Duplicate';
$errors[] = 'Callsign must be unique. Another repository already '.
'uses that callsign.';
} else {
throw $ex;
}
} catch (AphrontQueryDuplicateKeyException $ex) {
$e_callsign = 'Duplicate';
$errors[] = 'Callsign must be unique. Another repository already '.
'uses that callsign.';
}
}
}