Skip to content

Commit

Permalink
Fix setrawcookie() deprecation on null parameter (#304)
Browse files Browse the repository at this point in the history
  • Loading branch information
thePanz authored Jan 3, 2024
1 parent 57758f5 commit d1dc877
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/response/sfWebResponse.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,8 @@ public function sendHttpHeaders()
// cookies
foreach ($this->cookies as $cookie) {
$expire = isset($cookie['expire']) ? $cookie['expire'] : 0;
setrawcookie($cookie['name'], $cookie['value'], $expire, $cookie['path'], $cookie['domain'], $cookie['secure'], $cookie['httpOnly']);
$domain = isset($cookie['domain']) ? $cookie['domain'] : '';
setrawcookie($cookie['name'], $cookie['value'], $expire, $cookie['path'], $domain, $cookie['secure'], $cookie['httpOnly']);

if ($this->options['logging']) {
$this->dispatcher->notify(new sfEvent($this, 'application.log', array(sprintf('Send cookie "%s": "%s"', $cookie['name'], $cookie['value']))));
Expand Down

0 comments on commit d1dc877

Please sign in to comment.