From 94eb165d3900de399b8ea8d69578fb4133247393 Mon Sep 17 00:00:00 2001 From: skeeter Date: Sat, 14 Sep 2002 21:58:39 +0000 Subject: [PATCH] Added mr_e's patch. --- phpgwapi/inc/class.sessions_db.inc.php | 9 ++++++++- phpgwapi/inc/class.sessions_php4.inc.php | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/phpgwapi/inc/class.sessions_db.inc.php b/phpgwapi/inc/class.sessions_db.inc.php index 4ebeac79fc..f8fb3ebe71 100644 --- a/phpgwapi/inc/class.sessions_db.inc.php +++ b/phpgwapi/inc/class.sessions_db.inc.php @@ -303,7 +303,14 @@ $dom = $arr[1]; } $parts = explode('.',$dom); - $this->dom = '.'.$parts[count($parts)-2].'.'.$parts[count($parts)-1]; + if (count($parts) > 2) + { + $this->dom = '.'.$parts[count($parts)-2].'.'.$parts[count($parts)-1]; + } + else + { + $this->dom = ''; + } } function phpgw_setcookie($cookiename,$cookievalue='',$cookietime=0) diff --git a/phpgwapi/inc/class.sessions_php4.inc.php b/phpgwapi/inc/class.sessions_php4.inc.php index 91e42a7ce5..67d94cc895 100644 --- a/phpgwapi/inc/class.sessions_php4.inc.php +++ b/phpgwapi/inc/class.sessions_php4.inc.php @@ -288,7 +288,14 @@ $dom = $arr[1]; } $parts = explode('.',$dom); - $this->dom = '.'.$parts[count($parts)-2].'.'.$parts[count($parts)-1]; + if (count($parts) > 2) + { + $this->dom = '.'.$parts[count($parts)-2].'.'.$parts[count($parts)-1]; + } + else + { + $this->dom = ''; + } } function phpgw_setcookie($cookiename,$cookievalue='',$cookietime=0)