Skip to content

Commit d1dc877

Browse files
authored
Fix setrawcookie() deprecation on null parameter (#304)
1 parent 57758f5 commit d1dc877

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/response/sfWebResponse.class.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,8 @@ public function sendHttpHeaders()
359359
// cookies
360360
foreach ($this->cookies as $cookie) {
361361
$expire = isset($cookie['expire']) ? $cookie['expire'] : 0;
362-
setrawcookie($cookie['name'], $cookie['value'], $expire, $cookie['path'], $cookie['domain'], $cookie['secure'], $cookie['httpOnly']);
362+
$domain = isset($cookie['domain']) ? $cookie['domain'] : '';
363+
setrawcookie($cookie['name'], $cookie['value'], $expire, $cookie['path'], $domain, $cookie['secure'], $cookie['httpOnly']);
363364

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

0 commit comments

Comments
 (0)