Page MenuHomePhorge

Fail more gracefully passing an array to AphrontRequest::getStr()
AcceptedPublic

Authored by aklapper on Tue, Jun 10, 17:15.

Details

Summary

It is possible to construct URIs with array parameters which end up in AphrontRequest::getStr() which previously just casted the passed value to a string via a (string) prefix.
This leads to an ugly EXCEPTION: (RuntimeException) Array to string conversion.

Instead, fail more gracefully with (Exception) Value passed to "phutil_string_cast()" is an array; arrays can not be sensibly cast to strings.

Closes T16102

Test Plan

Unclear.

Diff Detail

Repository
rP Phorge
Branch
arrayT16102 (branched from master)
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 2088
Build 2088: arc lint + arc unit