diff --git a/src/Command/BakeMigrationDiffCommand.php b/src/Command/BakeMigrationDiffCommand.php index 58dc44b0..78b4a41f 100644 --- a/src/Command/BakeMigrationDiffCommand.php +++ b/src/Command/BakeMigrationDiffCommand.php @@ -451,7 +451,7 @@ protected function checkSync() $lastVersion = $this->migratedItems[0]['version']; $lastFile = end($this->migrationsFiles); - return (bool)strpos($lastFile, (string)$lastVersion); + return $lastFile && (bool)strpos($lastFile, (string)$lastVersion); } return false;