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) ...

This commit is contained in:
Ralf Becker 2004-04-27 07:54:56 +00:00
parent 413710d555
commit 3b94536b99

View File

@ -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