ludofleury / GuzzleBundle

Debug your API Calls with a Symfony web profiler for guzzle
http://ludofleury.github.io/GuzzleBundle/
MIT License
82 stars 21 forks source link

Fixed a bug when having array-like parameters in the query string. #6

Closed pylebecq closed 11 years ago

pylebecq commented 11 years ago

Hey there,

This PR is about fixing a bug when having array-like parameters in the query string of a guzzle call. Before this patch, the profiler could not be shown because it throws an exception:

An exception has been thrown during the rendering of a template ("Notice: Array to string conversion in /home/pierreyves/projects/symfony2/xxxxxxx/app/cache/dev/twig/8e/0d/8b3b4f55ad9365b3a14408ef3e15.php line 164") in PlaybloomGuzzleBundle:Collector:guzzle.html.twig at line 46.

The parameters are now shown like the following examples:

?foo=bar             --> bar
?foo[]=bar&foo[]=baz --> [0 => bar, 1 => baz]
?foo[bar][baz]=hey   --> [bar => [baz => hey]]

Regards.

ludofleury commented 11 years ago

Awesome. Thanks for your PR.