Skip to content

Commit

Permalink
ManageFrequencies::days() might be passed an array containing strings
Browse files Browse the repository at this point in the history
  • Loading branch information
shaedrich authored Dec 20, 2024
1 parent d3d0cac commit 0872764
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Illuminate/Console/Scheduling/ValidatesFrequencies.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,12 @@ protected function validateMonth(int $month)
}

/**
* @param int $dayOfMonth
* @param int|string $dayOfMonth
*/
protected function validateDayOfMonth(int $dayOfMonth)
protected function validateDayOfMonth(int|string $dayOfMonth)
{
if (is_string($dayOfMonth)) return;

if ($dayOfMonth < 0 || $dayOfMonth > 31) {
throw new InvalidArgumentException("Day of month cron expression component must be between 0 and 31 (at most). [$dayOfMonth] given");
}
Expand Down

0 comments on commit 0872764

Please sign in to comment.