From e5f05674f5d9458ad09a4cf7ef6eecc99d201762 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Thu, 3 Mar 2022 16:58:12 +0100 Subject: [PATCH] Pass `''` instead of `null` to `http_build_query()`'s second parameter Passing `null` will show a deprecation warning with PHP 8.1. --- src/HttpBaseTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/HttpBaseTest.php b/src/HttpBaseTest.php index 44a7f7d..cbf7a4f 100644 --- a/src/HttpBaseTest.php +++ b/src/HttpBaseTest.php @@ -119,7 +119,7 @@ private function getMethods(): array protected function getUri(array $query = []) { return !empty($query) - ? PHPUnitUtility::getUri().'?'.http_build_query($query, null, '&') + ? PHPUnitUtility::getUri().'?'.http_build_query($query, '', '&') : PHPUnitUtility::getUri(); } @@ -192,7 +192,7 @@ private function getBodies() { return [ null, - http_build_query($this->getData(), null, '&'), + http_build_query($this->getData(), '', '&'), ]; }