diff --git a/app/lib/vendor/jFramework/Core/DatabaseManager.php b/app/lib/vendor/jFramework/Core/DatabaseManager.php
index <HASH>..<HASH> 100644
--- a/app/lib/vendor/jFramework/Core/DatabaseManager.php
+++ b/app/lib/vendor/jFramework/Core/DatabaseManager.php
@@ -166,7 +166,7 @@ class DatabaseManager extends \mysqli
         $this->cacheTable = unserialize(file_get_contents($this->cacheFile));
 
         // Check
-        if (!isset($_SESSION ['SQL_HISTORY']) && $this->sqlArchive) {
+        if (!isset($_SESSION ['SQL_HISTORY']) && $this->sqlArchive && defined('CONTROLLER')) {
             // Reset Arrays
             $_SESSION ['SQL_HISTORY'] = array();
             $_SESSION ['SQL_LASTCONTROLLER'] = CONTROLLER;
Implement a failsafe for CONTROLLER if the Database Manager is used outside jFramework