Skip to content

Commit 166a6cc

Browse files
committed
fix: patch up withoutCookie()
1 parent 7a10da5 commit 166a6cc

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/Response.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -511,6 +511,14 @@ public function withCookie(string $name, string $value, ?int $expire = null): Re
511511
*/
512512
public function withoutCookie($name): Response
513513
{
514+
if (is_array($name)) {
515+
foreach ($name as $cookie) {
516+
$this->withoutCookie($cookie);
517+
}
518+
519+
return $this;
520+
}
521+
514522
$this->cookies[$name] = ['', -1];
515523

516524
if (class_exists('Leaf\Eien\Server') && PHP_SAPI === 'cli') {

0 commit comments

Comments
 (0)