diff --git a/lib/ObjectSerializer.php b/lib/ObjectSerializer.php index 160619f..54a1548 100644 --- a/lib/ObjectSerializer.php +++ b/lib/ObjectSerializer.php @@ -495,7 +495,8 @@ public static function deserialize($data, $class, $httpHeaders = null) if (method_exists($class, 'getAllowableEnumValues')) { if (!in_array($data, $class::getAllowableEnumValues(), true)) { - $data = end($class::getAllowableEnumValues()); + $allowableEnumValues = $class::getAllowableEnumValues(); + $data = end($allowableEnumValues); } return $data; } else {