EllisLab text mark
Advanced Search
     
Bug in cookie helper?
Posted: 27 July 2007 12:51 AM
Avatar
Joined: 2006-12-07
45 posts

It is likely to be my lack of understanding but, doesn’t the following code in the cookie helper ACHIEVE nothing?

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.

 
Posted: 27 July 2007 12:56 AM   [ # 1 ]   [ Rating: 0 ]
Avatar
Joined: 2006-06-23
370 posts

You’re right. This was pointed out before. I’m surprised it’s not fixed yet.

 Signature 

Mac OS X 10.8, Apache 2.x, NGiNX, PHP 5.4.x, CodeIgniter 1.7.2/2.1.3

 
Posted: 27 July 2007 01:11 AM   [ # 2 ]   [ Rating: 0 ]
Avatar
Joined: 2006-12-07
45 posts

Thanks for the sanity check.

 
Posted: 27 July 2007 08:20 AM   [ # 3 ]   [ Rating: 0 ]
Avatar
Joined: 2006-03-23
3194 posts

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/trunk/system/helpers/cookie_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.

 Signature 

DerekAllard.com - CodeIgniter, ExpressionEngine, and the World of Web Design

 
Posted: 27 July 2007 08:31 AM   [ # 4 ]   [ Rating: 0 ]
Avatar
Joined: 2006-12-07
45 posts

No need for apologies, you guys are my heroes.