Skip to content

Commit

Permalink
Cast string
Browse files Browse the repository at this point in the history
  • Loading branch information
kitloong committed Sep 26, 2021
1 parent 9833872 commit f2d0053
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/MigrationsGenerator/MigrateGenerateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,9 @@ protected function askInt(string $question, int $default = null): int
$ask .= ' or blank for default. [Default: '.$default.']';
}

$answer = $this->ask($question, $default);
$answer = $this->ask($question, (string) $default);
while (!ctype_digit($answer) && !($answer === '' && !is_null($default))) {
$answer = $this->ask($ask, $default);
$answer = $this->ask($ask, (string) $default);
}

if ($answer === '') {
Expand Down

0 comments on commit f2d0053

Please sign in to comment.