mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-05-14 02:03:55 -04:00
fix: Test setupMigrations doesn't return false (#3113)
`file_put_contents` can return 0 if there’s nothing to write in the `applied_migrations.txt` file, which is equivalent to `false`. Since there are no migrations yet, this is what happens. Because this value (i.e. `0`) is tested next in the `app/install.php` file, the install script was failing.
This commit is contained in:
committed by
GitHub
parent
cada19eb87
commit
877f5f539b
@@ -127,5 +127,5 @@ function setupMigrations() {
|
||||
|
||||
$migrator = new Minz_Migrator($migrations_path);
|
||||
$versions = implode("\n", $migrator->versions());
|
||||
return @file_put_contents($migrations_version_path, $versions);
|
||||
return @file_put_contents($migrations_version_path, $versions) !== false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user