Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getMigrationLastImportedTime must return string #5839

Open
martin-klima opened this issue Dec 14, 2023 · 0 comments
Open

getMigrationLastImportedTime must return string #5839

martin-klima opened this issue Dec 14, 2023 · 0 comments

Comments

@martin-klima
Copy link

martin-klima commented Dec 14, 2023

Method getMigrationLastImportedTime must return a string, but returns FALSE for migrations that have never run.

Migrations that have never run, have FALSE b:0; in the key_value table.

$this->keyValue->get($migration->id(), '') returns FALSE.

It causes an error:

TypeError: Drush\Commands\core\MigrateRunnerCommands::getMigrationLastImportedTime(): Return value must be of type string, bool returned in Drush\Commands\core\MigrateRunnerCommands->getMigrationLastImportedTime() (line 282 of /var/www/vendor/drush/drush/src/Commands/core/MigrateRunnerCommands.php).

Possible solution:
Use
return (string) $lastImported;

instead of
return $lastImported;

It will convert FALSE to the empty character.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants