From 96222312bd58ff132779a02d4af9e1d0e9853d94 Mon Sep 17 00:00:00 2001
From: hahn <axel.hahn@iml.unibe.ch>
Date: Thu, 31 Aug 2017 08:47:46 +0200
Subject: [PATCH] ci server - valuestore: fix dbcreate

---
 public_html/valuestore/classes/valuestore.class.php | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/public_html/valuestore/classes/valuestore.class.php b/public_html/valuestore/classes/valuestore.class.php
index 8d25fcee..7729d78f 100644
--- a/public_html/valuestore/classes/valuestore.class.php
+++ b/public_html/valuestore/classes/valuestore.class.php
@@ -124,7 +124,9 @@ class valuestore {
             echo $this->_bDebug ? "removing existing file $this->_dbfile ...<br>\n" : '';
             unlink($this->_dbfile);
         }
+        // after deleting the db file we nee to re instantiate
         echo $this->_bDebug ? "create database as file $this->_dbfile ...<br>\n" : '';
+        $this->_oDB = new PDO("sqlite:" . $this->_dbfile);
         $this->_makeQuery($this->_sCreate);
         if (!file_exists($this->_dbfile)) {
             $this->_quit(__FUNCTION__ , "ERROR: unable to create sqlite database " . $this->_dbfile);
-- 
GitLab