From f2d005373c4a024ca88f4cd6065b23f17554eefb Mon Sep 17 00:00:00 2001 From: Kit Loong Date: Sun, 26 Sep 2021 23:18:34 +0800 Subject: [PATCH] Cast string --- src/MigrationsGenerator/MigrateGenerateCommand.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/MigrationsGenerator/MigrateGenerateCommand.php b/src/MigrationsGenerator/MigrateGenerateCommand.php index 04a07d4e..d5017a46 100644 --- a/src/MigrationsGenerator/MigrateGenerateCommand.php +++ b/src/MigrationsGenerator/MigrateGenerateCommand.php @@ -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 === '') {