From 25be1792e6337b8fdf77996a56cde71774554107 Mon Sep 17 00:00:00 2001 From: "monte.ohrt" Date: Sun, 17 May 2009 14:48:19 +0000 Subject: [PATCH] fix E_NOTICE with sessions disabled --- libs/Smarty.class.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index 1b35d90b..fc8e29dc 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -582,7 +582,10 @@ class Smarty $this->_supers['get'] = $this->request_use_auto_globals ? $_GET : $GLOBALS['HTTP_GET_VARS']; $this->_supers['post'] = $this->request_use_auto_globals ? $_POST : $GLOBALS['HTTP_POST_VARS']; $this->_supers['server'] = $this->request_use_auto_globals ? $_SERVER : $GLOBALS['HTTP_SERVER_VARS']; - $this->_supers['session'] = $this->request_use_auto_globals ? $_SESSION : $GLOBALS['HTTP_SESSION_VARS']; + if(isset($_SESSION)) + $this->_supers['session'] = $this->request_use_auto_globals ? $_SESSION : $GLOBALS['HTTP_SESSION_VARS']; + else + $this->_supers['session'] = array(); $this->_supers['request'] = $this->request_use_auto_globals ? $_REQUEST : $GLOBALS['HTTP_REQUEST_VARS']; $this->_supers['cookies'] = $this->request_use_auto_globals ? $_COOKIE : $GLOBALS['HTTP_COOKIE_VARS']; $this->_supers['env'] = $this->request_use_auto_globals ? $_ENV : $GLOBALS['HTTP_ENV_VARS'];