guzzle/guzzle — pull request #272 by bradfeehan (2013-03-25 04:28:48+00:00)
Title: Improve "[PARAM] is a required [TYPE]" message

There's an error when Guzzle is trying to create an error message of the form "ID is a required integer", but the type is an array (union) of types rather than a single type in a string.

In PHP 5.4, this causes a notice "array to string conversion", and in all versions of PHP, the message Guzzle generated reads "ID is a required Array" (where "Array" is the result of the array-to-string conversion, almost always not what you want).

This pull request adopts the convention elsewhere in the file of using `implode(' or ', (array) $param->getType())` to handle the case where the type is an array.

I also added a test case illustrating the expected behaviour.