Skip to content

Commit 9d5c8bb

Browse files
authored
[1.x] Fix passing null to cookie for domain (#478)
* Throw deprecations * Fix null deprecation
1 parent 1b2d5f5 commit 9d5c8bb

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ jobs:
2828
with:
2929
php-version: ${{ matrix.php }}
3030
extensions: dom, curl, libxml, mbstring, zip, ${{ matrix.driver }}
31+
ini-values: error_reporting=E_ALL
3132
tools: composer:v2
3233
coverage: none
3334

src/Swoole/SwooleClient.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,10 +192,10 @@ public function sendResponseHeaders(Response $response, SwooleResponse $swooleRe
192192
$cookie->getValue(),
193193
$cookie->getExpiresTime(),
194194
$cookie->getPath(),
195-
$cookie->getDomain(),
195+
$cookie->getDomain() ?? '',
196196
$cookie->isSecure(),
197197
$cookie->isHttpOnly(),
198-
$cookie->getSameSite()
198+
$cookie->getSameSite(),
199199
);
200200
}
201201
}

0 commit comments

Comments
 (0)