mikealmond / MusicBrainz

A PHP library to access MusicBrainz's Web Service v2
http://musicbrainz.org/doc/Development
MIT License
64 stars 26 forks source link

HttpAdapter can force json_decode to return an array #19

Closed DanielMaly closed 8 years ago

DanielMaly commented 8 years ago

search() would throw an exception where json_decode returned an object to RequestHttpAdapter, as FilterInterface::parseResponse expects an array. I added a parameter to the call method so that search() can specify what it wants to be returned. Fixes issue #1006 in ampache, for example.

Afterster commented 8 years ago

Any new @mikealmond? This would indeed fix https://github.com/ampache/ampache/issues/1006

Thank you.

mikealmond commented 8 years ago

Thanks for this!

This adds more code smell to a library that is already filled with code smell. I'm working on cleaning that up in the 0.3 release.