@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+2 -2
+2 -2
src/applications/conpherence/controller/ConpherenceViewController.php
··· 27 27 $after_transaction_id = $request->getInt('newest_transaction_id'); 28 28 $old_message_id = $request->getURIData('messageID'); 29 29 if ($before_transaction_id && ($old_message_id || $after_transaction_id)) { 30 - throw new Aphront400Response(); 30 + return new Aphront400Response(); 31 31 } 32 32 if ($old_message_id && $after_transaction_id) { 33 - throw new Aphront400Response(); 33 + return new Aphront400Response(); 34 34 } 35 35 36 36 $marker_type = 'older';