See D20114. Somewhat (un-?) surprisingly, http_build_query() accepts an arbitrarily deeply-nested mess of arrays and encodes them in a PHP-specific way.
We generally don't want this to happen, so fail explicitly when it does.
Differential D20116
Explicitly fail if `phutil_build_http_querystring()` is passed a map of nonscalars epriestley on Feb 7 2019, 12:34 AM. Authored by Tags None Referenced Files
Subscribers
Details See D20114. Somewhat (un-?) surprisingly, http_build_query() accepts an arbitrarily deeply-nested mess of arrays and encodes them in a PHP-specific way. We generally don't want this to happen, so fail explicitly when it does. Published a story on master (without D20114) with feed.http-hooks enabled, got a more helpful/explicit error.
Diff Detail
Event TimelineComment Actions This broke some custom fields. Specifically, this custom field results in Phabricator fataling: { "test": { "name": "Test", "type": "users", "search": true } } The error message is: >>> UNRECOVERABLE FATAL ERROR <<< Method PhutilURI::__toString() must not throw an exception, caught Exception: HTTP query parameter (with key "parameters") is not a scalar. Parameters must all be scalars. /usr/local/src/phabricator/src/applications/typeahead/datasource/PhabricatorTypeaheadDatasource.php:0 ┻━┻ ︵ ¯\_(ツ)_/¯ ︵ ┻━┻ Comment Actions "Land Revision" button is also broken, returns identical error... >>> UNRECOVERABLE FATAL ERROR <<< Method PhutilURI::__toString() must not throw an exception /etc/phabricator/phabricator/src/applications/typeahead/datasource/PhabricatorTypeaheadDatasource.php:0 ┻━┻ ︵ ¯\_(ツ)_/¯ ︵ ┻━┻ Comment Actions Please report bugs to Discourse, not by making comments on changes or commits. If you believe you know which change caused a problem, you can link to it from your bug report on Discourse. It's easy for us to keep track of threads, and hard to keep track of random comments on already-closed changes. Thanks! |