From a7acbc30103682a609b602cb0876f033a0b80dd5 Mon Sep 17 00:00:00 2001
From: Paul Water
Date: Sat, 26 Dec 2020 14:52:43 +0100
Subject: [PATCH] PHP 8 ready.
---
.scrutinizer.yml | 4 ++++
.travis.yml | 2 +-
src/Url.php | 2 +-
3 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/.scrutinizer.yml b/.scrutinizer.yml
index ba3ff8a..07f6437 100644
--- a/.scrutinizer.yml
+++ b/.scrutinizer.yml
@@ -5,6 +5,10 @@ filter:
- 'test/'
build:
+ environment:
+ php:
+ version: '7.4'
+
nodes:
analysis:
tests:
diff --git a/.travis.yml b/.travis.yml
index 33d0209..8ab1122 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,7 +1,7 @@
language: php
php:
- - '7.3'
- '7.4'
+ - '8.0'
install:
- composer self-update
diff --git a/src/Url.php b/src/Url.php
index debe4e4..f022313 100644
--- a/src/Url.php
+++ b/src/Url.php
@@ -100,7 +100,7 @@ public static function combine(string $uri1, string $uri2): string
}
// Handle spacial cases for the fragment part of the URI.
- if (!isset($parts2['fragment']))
+ if (($parts2['fragment'] ?? '')==='')
{
$combined_uri_parts['fragment'] = null;
}