diff --git a/lib/StripeObject.php b/lib/StripeObject.php index 635ce546f..c256bc9b0 100644 --- a/lib/StripeObject.php +++ b/lib/StripeObject.php @@ -243,7 +243,7 @@ public function refreshFrom($values, $opts, $partial = false) $this->_originalValues = self::deepCopy($values); if ($values instanceof StripeObject) { - $values = $values->toArray(true); + $values = $values->toArray(); } // Wipe old state before setting new. This is useful for e.g. updating a @@ -401,7 +401,7 @@ public function serializeParamsValue($value, $original, $unsaved, $force, $key = public function jsonSerialize() { - return $this->toArray(true); + return $this->toArray(); } /** @@ -441,7 +441,7 @@ public function toArray() */ public function toJSON() { - return json_encode($this->toArray(true), JSON_PRETTY_PRINT); + return json_encode($this->toArray(), JSON_PRETTY_PRINT); } public function __toString() diff --git a/tests/Stripe/Util/UtilTest.php b/tests/Stripe/Util/UtilTest.php index 71c089deb..39e181c52 100644 --- a/tests/Stripe/Util/UtilTest.php +++ b/tests/Stripe/Util/UtilTest.php @@ -31,7 +31,7 @@ public function testConvertStripeObjectToArrayIncludesId() ], null ); - $this->assertTrue(array_key_exists("id", $customer->toArray(true))); + $this->assertTrue(array_key_exists("id", $customer->toArray())); } public function testUtf8()