From 1033fd9adfc43a042c7b9a61aaa8e7b691b7be84 Mon Sep 17 00:00:00 2001 From: Mathieu GILLOOTS Date: Tue, 23 May 2023 20:49:53 +0200 Subject: [PATCH] fix: Array and string offset access syntax with curly braces is no longer supported --- composer.json | 2 +- src/Rdap.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 4914f2c..2dea6ee 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,7 @@ "minimum-stability": "stable", "license": "proprietary", "require": { - "php": ">=7.2", + "php": ">=7.4", "ext-json": "*" }, "authors": [ diff --git a/src/Rdap.php b/src/Rdap.php index 1c04bce..76d6433 100644 --- a/src/Rdap.php +++ b/src/Rdap.php @@ -128,7 +128,7 @@ public function search(string $search): ?RdapResponse { // exact match if ($number === $parameter) { // check for slash as last character in the server name, if not, add it - if ($service[1][0]{strlen($service[1][0]) - 1} !== '/') { + if ($service[1][0][strlen($service[1][0]) - 1] !== '/') { $service[1][0] .= '/'; }