From 3b94536b995063a5f7ed33dfca1b86b586b747f9 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 27 Apr 2004 07:54:56 +0000 Subject: [PATCH] setcookie seems not to like domain-names without dots (it does not set the cookie at all, in that case). Leaving the domain-name empty, get setcookie to set the domain without dot by itself (its the default) ... --- phpgwapi/inc/class.sessions.inc.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/phpgwapi/inc/class.sessions.inc.php b/phpgwapi/inc/class.sessions.inc.php index 63614d0b9a..b2b44ced75 100644 --- a/phpgwapi/inc/class.sessions.inc.php +++ b/phpgwapi/inc/class.sessions.inc.php @@ -437,6 +437,11 @@ { $this->cookie_domain = $arr[1]; } + if (count(explode('.',$this->cookie_domain)) <= 1) + { + // setcookie dont likes domains without dots, leaving it empty, gets setcookie to fill the domain in + $this->cookie_domain = ''; + } print_debug('COOKIE_DOMAIN',$this->cookie_domain,'api'); $this->set_cookie_params($this->cookie_domain); // for php4 sessions necessary