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