Skip to content

Commit

Permalink
Fix bug where we fail to serialize even with no required data. (#142)
Browse files Browse the repository at this point in the history
* WIP

* WIP

* WIP
  • Loading branch information
DanielCoulbourne authored May 30, 2024
1 parent c3687a3 commit be2f0bf
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public static function deserializeForVerbs(array $data, DenormalizerInterface $d
{
$required = self::requiredDataForVerbsDeserialization();

if (! Arr::has($data, $required)) {
if (! empty($required) && ! Arr::has($data, $required)) {
throw new InvalidArgumentException(sprintf(
'The following data is required to deserialize to "%s": %s.',
class_basename(static::class),
Expand Down

0 comments on commit be2f0bf

Please sign in to comment.