@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.

When an invalid "constraints" parameter is provided to a "*.search" method, raise a more tailored error

Summary:
See <https://discourse.phabricator-community.org/t/constraints-parameter-type-handling-in-maniphest-search/2636>.

(The caller provided `constraints={...}` via cURL, but you can't mix JSON and HTTP parameters like that.)

Test Plan: Called `curl 'http://local.phacility.com/api/maniphest.search?api.token=...&constraints=X'` (with a valid API token), got a more sensible error.

Reviewers: amckinley

Reviewed By: amckinley

Differential Revision: https://secure.phabricator.com/D20429

+6
+6
src/applications/search/engine/PhabricatorApplicationSearchEngine.php
··· 1142 1142 } 1143 1143 1144 1144 $constraints = $request->getValue('constraints', array()); 1145 + if (!is_array($constraints)) { 1146 + throw new Exception( 1147 + pht( 1148 + 'Parameter "constraints" must be a map of constraints, got "%s".', 1149 + phutil_describe_type($constraints))); 1150 + } 1145 1151 1146 1152 $fields = $this->getSearchFieldsForConduit(); 1147 1153