jsondb stoppe après une erreur de chargement

This commit is contained in:
Fred Tempez 2024-03-30 09:16:27 +01:00
parent 10f8340e76
commit 638ddadb61

View File

@ -121,10 +121,10 @@ class JsonDb extends \Prowebcraft\Dot
} else {
if ($this->config['backup']) {
try {
//todo make backup of database
copy($this->config['dir'] . DIRECTORY_SEPARATOR . $this->config['name'], $this->config['dir'] . DIRECTORY_SEPARATOR . $this->config['name'] . '.backup');
} catch (\Exception $e) {
error_log('Erreur de chargement : ' . $e);
exit('Erreur de chargement : ' . $e);
}
}
}