MeterEventStream returns a void response.
As part of request handling we setLastResponse on the returned object from \Stripe\Util\Util::convertToStripeObject. Empty response meant we were getting back an array.
Fix
If the returned object is an array, we create a new empty StripeObject and set the response on it.
Another option would've been to skip setting the response itself. Open to hearing your opinions based on how this is handled in other languages.
MeterEventStream returns a void response. As part of request handling we setLastResponse on the returned object from
\Stripe\Util\Util::convertToStripeObject
. Empty response meant we were getting back an array.Fix
If the returned object is an array, we create a new empty StripeObject and set the response on it.
Another option would've been to skip setting the response itself. Open to hearing your opinions based on how this is handled in other languages.
Sample code that caused this issue.