From 4ab3c765fe0666e78e6649593243384ac32f5420 Mon Sep 17 00:00:00 2001 From: Basil Suter Date: Wed, 13 Sep 2023 08:42:20 +0000 Subject: [PATCH] php 8.1 issue for empty server url --- .github/workflows/tests.yml | 4 ++-- src/base/AbstractRequestClient.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 909f839..3913058 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -14,7 +14,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - php: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2'] + php: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3'] steps: ## checkout the repoistory @@ -36,7 +36,7 @@ jobs: ## run unit tests - name: PHP Unit tests for PHP run: vendor/bin/phpunit --verbose --configuration actions.phpunit.xml - if: matrix.php == '8.2' || matrix.php == '8.1' || matrix.php == '8.0' || matrix.php == '7.4' || matrix.php == '7.3' + if: matrix.php == '8.3' || matrix.php == '8.2' || matrix.php == '8.1' || matrix.php == '8.0' || matrix.php == '7.4' || matrix.php == '7.3' ## unit test with coverage - name: PHP Unit tests for PHP 7.2 diff --git a/src/base/AbstractRequestClient.php b/src/base/AbstractRequestClient.php index ad2af89..563cf0d 100644 --- a/src/base/AbstractRequestClient.php +++ b/src/base/AbstractRequestClient.php @@ -211,7 +211,7 @@ public function setEndpoint($endpoint) */ public function getRequestUrl() { - $parts = [rtrim($this->client->serverUrl, '/'), $this->client->language, ltrim((string) $this->endpoint, '/')]; + $parts = [rtrim((string) $this->client->serverUrl, '/'), $this->client->language, ltrim((string) $this->endpoint, '/')]; $url = implode("/", array_filter($parts));