Skip to content

Commit

Permalink
Validate number range in NumeroALetras class
Browse files Browse the repository at this point in the history
  • Loading branch information
lecano committed Jan 29, 2025
1 parent f69cf85 commit 7de9fae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/NumeroALetras.php
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ private function convertNumber(int $number): string
{
$converted = '';

if (($number < 0) || !is_numeric($number)) {
if ($number < 0 || !is_numeric($number) || $number > 999999999) {
throw new ParseError('Invalid number');
}

Expand Down

0 comments on commit 7de9fae

Please sign in to comment.