mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-14 18:08:21 +01:00
only try sending cookies, if headers are not send, otherwise it gives just a warning
This commit is contained in:
parent
240e09440f
commit
8df8817318
@ -1213,7 +1213,10 @@ class egw_session
|
|||||||
}
|
}
|
||||||
if (self::ERROR_LOG_DEBUG) error_log(__METHOD__."($cookiename,$cookievalue,$cookietime,$cookiepath,".self::$cookie_domain.")");
|
if (self::ERROR_LOG_DEBUG) error_log(__METHOD__."($cookiename,$cookievalue,$cookietime,$cookiepath,".self::$cookie_domain.")");
|
||||||
|
|
||||||
$rv = setcookie($cookiename,$cookievalue,$cookietime,is_null($cookiepath) ? self::$cookie_path : $cookiepath,self::$cookie_domain);
|
if(!headers_sent()) // gives only a warning, but can not send the cookie anyway
|
||||||
|
{
|
||||||
|
$rv = setcookie($cookiename,$cookievalue,$cookietime,is_null($cookiepath) ? self::$cookie_path : $cookiepath,self::$cookie_domain);
|
||||||
|
}
|
||||||
//error_log(__METHOD__." $cookiename->$cookievalue".' returned:'.print_r($rv,true).print_r($_COOKIE,true));
|
//error_log(__METHOD__." $cookiename->$cookievalue".' returned:'.print_r($rv,true).print_r($_COOKIE,true));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user