From 38a9c10c59d50774f34dd8d2d274298f17cfad6d Mon Sep 17 00:00:00 2001 From: HB9HIL Date: Wed, 4 Dec 2024 17:20:53 +0100 Subject: [PATCH] fix[installer]: only delete the migration lockfile if it really exists --- system/libraries/Migration.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/system/libraries/Migration.php b/system/libraries/Migration.php index 256748747..e27ade116 100644 --- a/system/libraries/Migration.php +++ b/system/libraries/Migration.php @@ -348,8 +348,10 @@ class CI_Migration { log_message('debug', 'Finished migrating to '.$current_version); // After the migrations we can remove the lockfile - unlink($this->_migration_lockfile); - log_message('debug', 'Deleted migration lockfile'); + if (file_exists($this->_migration_lockfile)) { + unlink($this->_migration_lockfile); + log_message('debug', 'Deleted migration lockfile'); + } } else { log_message('error', 'Failed to create Migration Lockfile. Check directory permissions.');