Browse Source

unset db variable on disconnect

CauseFX 4 years ago
parent
commit
38c26db37d
1 changed files with 3 additions and 1 deletions
  1. 3 1
      api/classes/organizr.class.php

+ 3 - 1
api/classes/organizr.class.php

@@ -174,6 +174,8 @@ class Organizr
 	{
 		if ($this->hasDB()) {
 			$this->db->disconnect();
+			$this->db = null;
+			unset($this->db);
 		}
 	}
 	
@@ -2044,7 +2046,7 @@ class Organizr
 			'Database' => [
 				$this->settingsOption('notice', '', ['notice' => 'danger', 'title' => 'Warning', 'body' => 'This feature is experimental - You may face unexpected database is locked errors in logs']),
 				$this->settingsOption('html', '', ['label' => 'Journal Mode Status', 'html' => '<script>getJournalMode();</script><h4 class="journal-mode font-bold text-uppercase"><i class="fa fa-spin fa-circle-o-notch"></i></h4>']),
-				$this->settingsOption('blank'),
+				//$this->settingsOption('blank'),
 				$this->settingsOption('button', '', ['label' => 'Set DELETE Mode (Default)', 'icon' => 'icon-notebook', 'text' => 'Set', 'attr' => 'onclick="setJournalMode(\'DELETE\')"']),
 				$this->settingsOption('button', '', ['label' => 'Set WAL Mode', 'icon' => 'icon-notebook', 'text' => 'Set', 'attr' => 'onclick="setJournalMode(\'WAL\')"']),
 			],