From bed00bafb7b3d624f2066902080f8c029418bf44 Mon Sep 17 00:00:00 2001
From: Peter Rotich <peter@osticket.com>
Date: Fri, 31 Oct 2014 15:25:27 +0000
Subject: [PATCH] bug: Check to make sure $ost is initialized

---
 include/class.error.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/class.error.php b/include/class.error.php
index 7e9ecb8a9..72909a615 100644
--- a/include/class.error.php
+++ b/include/class.error.php
@@ -27,7 +27,7 @@ class Error extends Exception {
         parent::__construct(__($message));
         $message = str_replace(ROOT_DIR, '(root)/', _S($message));
 
-        if ($ost->getConfig()->getLogLevel() == 3)
+        if ($ost && $ost->getConfig()->getLogLevel() == 3)
             $message .= "\n\n" . $this->getBacktrace();
 
         $ost->logError($this->getTitle(), $message, static::$sendAlert);
-- 
GitLab