From 9cd7765d9ed57aa9e0ebf110604d90aaed4645d2 Mon Sep 17 00:00:00 2001
From: "Alexander A. Klimov" <alexander.klimov@netways.de>
Date: Wed, 22 Apr 2015 17:25:51 +0200
Subject: [PATCH] If session_save_path() returns '', use sys_get_temp_dir()

resolves #8994
---
 library/Icinga/Web/Session/PhpSession.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/library/Icinga/Web/Session/PhpSession.php b/library/Icinga/Web/Session/PhpSession.php
index f4aa72fa3..7f47763c0 100644
--- a/library/Icinga/Web/Session/PhpSession.php
+++ b/library/Icinga/Web/Session/PhpSession.php
@@ -77,7 +77,7 @@ class PhpSession extends Session
             }
         }
 
-        $sessionSavePath = session_save_path();
+        $sessionSavePath = session_save_path() ?: sys_get_temp_dir();
         if (session_module_name() === 'files' && !is_writable($sessionSavePath)) {
             throw new ConfigurationError("Can't save session, path '$sessionSavePath' is not writable.");
         }