mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 17:02:41 +01:00
Fix exception handling in ConpherenceViewController::handleRequest()
Summary: It is only possible `throw` an `Exception` class. `Aphront400Response` is not an Exception class but a `Phobject`. Thus `return` it, like the `Aphront404Response`s within the same method. Test Plan: Check parent classes; run static code analysis. Hack the code to force that return, and successfully obtain an HTTP 400 status code page. Reviewers: O1 Blessed Committers, valerio.bozzolan Reviewed By: O1 Blessed Committers, valerio.bozzolan Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno Differential Revision: https://we.phorge.it/D25780
This commit is contained in:
parent
b4bc480817
commit
9e6507d37a
1 changed files with 2 additions and 2 deletions
|
@ -27,10 +27,10 @@ final class ConpherenceViewController extends
|
||||||
$after_transaction_id = $request->getInt('newest_transaction_id');
|
$after_transaction_id = $request->getInt('newest_transaction_id');
|
||||||
$old_message_id = $request->getURIData('messageID');
|
$old_message_id = $request->getURIData('messageID');
|
||||||
if ($before_transaction_id && ($old_message_id || $after_transaction_id)) {
|
if ($before_transaction_id && ($old_message_id || $after_transaction_id)) {
|
||||||
throw new Aphront400Response();
|
return new Aphront400Response();
|
||||||
}
|
}
|
||||||
if ($old_message_id && $after_transaction_id) {
|
if ($old_message_id && $after_transaction_id) {
|
||||||
throw new Aphront400Response();
|
return new Aphront400Response();
|
||||||
}
|
}
|
||||||
|
|
||||||
$marker_type = 'older';
|
$marker_type = 'older';
|
||||||
|
|
Loading…
Reference in a new issue