Plan with ID of "0" returns Stripe_plan object without "id" key #55

kressaty opened this Issue Sep 24, 2013 · 2 comments


None yet

3 participants


I have a Stripe plan that has ID "0" that was created in the interface. When I request this plan with Stripe_Plan::all(), the plan with that ID is returned without an "id" key in _values. Not sure where to look in the request stack to figure this out, guessing it's being unset somewhere checking for false values? Or perhaps I'm just ignoring something obvious.


You should step through in the debugger to see if the "id" is ever set. I'd be curious to see if there really is a "==" somewhere that treats "0" as "false".

@KorvinSzanto KorvinSzanto added a commit to KorvinSzanto/stripe-php that referenced this issue Dec 20, 2013
@KorvinSzanto KorvinSzanto Allow falsy ID for plans
I encountered this issue, and saw that this was already reported in #55.
The fix I've included will solve the issue, but might impact other things, so this should be tested carefully.
Stripe member

Fixed via your PR. I also updated the test to not require the ID to exist or not exist, which was causing intermittent failures.

@bkrausz bkrausz closed this Jun 22, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment