I opened up the cookie helper and noticed 2 weird things going within the set_cookie() function.
Starting on line 61:
if ($prefix == '' AND $CI->config->item('cookie_prefix') != '')
{
$CI->config->item('cookie_prefix');
}
if ($domain == '' AND $CI->config->item('cookie_domain') != '')
{
$CI->config->item('cookie_domain');
}
if ($prefix == '/' AND $CI->config->item('cookie_path') != '/')
{
$CI->config->item('cookie_path');
}
What exactly is this doing? Nothing? Shouldn’t it be:
if ($prefix == '' AND $CI->config->item('cookie_prefix') != '')
{
$prefix = $CI->config->item('cookie_prefix');
}
if ($domain == '' AND $CI->config->item('cookie_domain') != '')
{
$domain = $CI->config->item('cookie_domain');
}
if ($path == '/' AND $CI->config->item('cookie_path') != '/')
{
$path = $CI->config->item('cookie_path');
}
Notice that the values are now being set so they can be used in the setcookie() function below. Also ... the last if statement was using if ($prefix ==). Shouldn’t that be $path.
