From 9d5c8bbe7ca763e6779de0e6b715333f7fe9c7d8 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Mon, 14 Feb 2022 18:09:52 +0100 Subject: [PATCH] [1.x] Fix passing null to cookie for domain (#478) * Throw deprecations * Fix null deprecation --- .github/workflows/tests.yml | 1 + src/Swoole/SwooleClient.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d4202baec..599a56814 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -28,6 +28,7 @@ jobs: with: php-version: ${{ matrix.php }} extensions: dom, curl, libxml, mbstring, zip, ${{ matrix.driver }} + ini-values: error_reporting=E_ALL tools: composer:v2 coverage: none diff --git a/src/Swoole/SwooleClient.php b/src/Swoole/SwooleClient.php index ab52e09a2..b6250439f 100644 --- a/src/Swoole/SwooleClient.php +++ b/src/Swoole/SwooleClient.php @@ -192,10 +192,10 @@ public function sendResponseHeaders(Response $response, SwooleResponse $swooleRe $cookie->getValue(), $cookie->getExpiresTime(), $cookie->getPath(), - $cookie->getDomain(), + $cookie->getDomain() ?? '', $cookie->isSecure(), $cookie->isHttpOnly(), - $cookie->getSameSite() + $cookie->getSameSite(), ); } }