“Headers already sent” warning in debug.log with litespeed
-
Hi – in functions.php right at the start, i am setting a cookie like that:
add_action( 'init', 'toa_setcookie' );
function toa_setcookie() {
if (!isset($_COOKIE['sid'])){
setcookie("sid", time(), 0, COOKIEPATH, COOKIE_DOMAIN);
}
}With litespeed plugin enabled i get a warning in debug.log:
Warning: Cannot modify header information - headers already sent etc.
With litespeed disabled there is no warning. Is there a way to use cookies with litespeed without warning? Some action to hook into? thanks
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘“Headers already sent” warning in debug.log with litespeed’ is closed to new replies.