Skip to content

Commit

Permalink
Normalize integers to be integers
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Dec 29, 2022
1 parent 0fcc271 commit a894ed1
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ protected function normalizeData(array $array): array
// we need to make sure they end with a newline.
$array[$key] = trim($value)."\n";
}

if ($type->type === PublicationFieldTypes::Integer) {
$array[$key] = (int) $value;
}
}

return $array;
Expand Down

0 comments on commit a894ed1

Please sign in to comment.