Welcome Guest, Not a member yet? Register   Sign In
Bug in cookie helper?
#1

[eluser]txomin[/eluser]
It is likely to be my lack of understanding but, doesn't the following code in the cookie helper ACHIEVE nothing?

Code:
function set_cookie($name = '', $value = '', $expire = '', $domain = '', $path = '/', $prefix = '')
{

...

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');
}

...

}

There are no assignments made inside the if statements... what am I missing here?

Thank you people.
#2

[eluser]coolfactor[/eluser]
You're right. This was pointed out before. I'm surprised it's not fixed yet.
#3

[eluser]txomin[/eluser]
Thanks for the sanity check.
#4

[eluser]Derek Allard[/eluser]
Hey txomin, I'm sorry for the confusion. This was fixed July 18th, but is still in the SVN. Grab a new copy from http://dev.ellislab.com/svn/CodeIgniter/...helper.php and you should be good to go. Sorry it didn't make it for the release of 1.5.4, I think it just got buried under other stuff.
#5

[eluser]txomin[/eluser]
No need for apologies, you guys are my heroes.




Theme © iAndrew 2016 - Forum software by © MyBB