From 945f45609cec8dee34a5dec32c2a34df25763caa Mon Sep 17 00:00:00 2001 From: fredtempez Date: Sun, 27 Dec 2020 10:10:50 +0100 Subject: [PATCH] Nouveau fichier json --- core/class/jsondb/JsonDb.class.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/class/jsondb/JsonDb.class.php b/core/class/jsondb/JsonDb.class.php index 35ec9608..23b8e5ac 100755 --- a/core/class/jsondb/JsonDb.class.php +++ b/core/class/jsondb/JsonDb.class.php @@ -127,6 +127,10 @@ class JsonDb extends \Prowebcraft\Dot * Saving to local database */ public function save() { + // Fichier inexistant, le créer + if ( !file_exists($this->db) ) { + touch($this->db); + } // Backup file if ($this->config['backup']) { copy ($this->db, $this->db . '.back');