Skip to content

A free, self-hostable news aggregator…

Changement sauvegarde configuration

Alexandre Alapetitebc4116ea77a9
diff --git a/app/Models/Configuration.php b/app/Models/Configuration.php
index abd874f27..a39d47888 100644
--- a/app/Models/Configuration.php
+++ b/app/Models/Configuration.php
@@ -79,7 +79,8 @@ class FreshRSS_Configuration {
}
public function save() {
- if (file_put_contents($this->filename, "<?php\n return " . var_export($array, true) . ';', LOCK_EX) === false) {
+ @rename($this->filename, $this->filename . '.bak');
+ if (file_put_contents($this->filename, "<?php\n return " . var_export($this->data, true) . ';', LOCK_EX) === false) {
throw new Minz_PermissionDeniedException($this->filename);
}
if (function_exists('opcache_invalidate')) {