From a96b0f8b014daf02bf8d6f998e1b04e5edd20a79 Mon Sep 17 00:00:00 2001 From: Widee Date: Fri, 7 Apr 2023 15:57:44 +0200 Subject: [PATCH] #464 Fix error strpos if $lastfile is null --- src/Command/BakeMigrationDiffCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;