From 609c5e9da9bb52c317eea1abbd424cca181caad9 Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Mon, 11 Jul 2011 06:51:42 -0400
Subject: [PATCH] Session object can be null if db/memcache is not available

---
 program/include/rcmail.php |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/program/include/rcmail.php b/program/include/rcmail.php
index dba846d..72f0efa 100644
--- a/program/include/rcmail.php
+++ b/program/include/rcmail.php
@@ -1165,7 +1165,7 @@
       $this->imap->close();
 
     // before closing the database connection, write session data
-    if ($_SERVER['REMOTE_ADDR']) {
+    if ($_SERVER['REMOTE_ADDR'] && is_object($this->session)) {
       $this->session->cleanup();
       session_write_close();
     }

--
Gitblit v1.9.1