• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is CI setting new cookies to expire yesterday?

#2
https://github.com/bcit-ci/CodeIgniter/issues/4904

(01-25-2018, 11:36 AM)pbarney Wrote: It's not ideal or obvious, but for a work around, we can add an explicit zero for the expiration time like this:

PHP Code:
$this->input->set_cookie('XDEBUG_PROFILE'$set0); 

Actually, that is ideal, at least as far as what you meant goes ... Because it's explicit, and I've learned the hard way - being explicit is always better.

The reason why this bug could ever happen is that we have default parameter values at all. If I was designing this today, you'd be always required to explicitly specify the first 3 parameters, but this goes waaaay back in history, before I ever got involved.

What's not ideal is that you don't need to use CI_Input or anything within CodeIgniter to set a cookie. Honestly, there's zero benefit to that; just use setcookie().
Reply


Messages In This Thread
RE: Is CI setting new cookies to expire yesterday? - by Narf - 01-26-2018, 08:15 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.