bcit-ci / CodeIgniter

Open Source PHP Framework (originally from EllisLab)
https://codeigniter.com/
MIT License
18.27k stars 7.6k forks source link

Fix setting/destroying multiple cookies PHP < 7.3 #6271

Open slatchurie opened 8 months ago

slatchurie commented 8 months ago

CI3 is using header instead of setcookie when PHP < 7.3. But each call to header('Set-Cookie: ...') is replacing the previews one, meaning only the last cookie setting/destroying command is sent.

Using header('Set-Cookie: ...', FALSE) to prevent replacing.