From 1412739b5a0d75ce1cca3ebf09c17923858db97c Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Wed, 16 Nov 2022 17:17:24 +0100 Subject: [PATCH] PHP 8.2 support --- src/type.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/type.php b/src/type.php index e981a6d..f318292 100644 --- a/src/type.php +++ b/src/type.php @@ -474,7 +474,7 @@ function internalDecode(string $fileId): array $result['typeId'] &= ~FILE_REFERENCE_FLAG; $result['typeId'] &= ~WEB_LOCATION_FLAG; if (!isset(TYPES[$result['typeId']])) { - throw new \InvalidArgumentException("Invalid file type provided: ${result['typeId']}"); + throw new \InvalidArgumentException("Invalid file type provided: {$result['typeId']}"); } $result['type'] = TYPES[$result['typeId']]; $res = \fopen('php://memory', 'rw+b'); @@ -593,7 +593,7 @@ function internalDecodeUnique(string $fileId): array $result = \unpack('VtypeId', $fileId); if (!isset(UNIQUE_TYPES[$result['typeId']])) { - throw new \InvalidArgumentException("Invalid file type provided: ${result['typeId']}"); + throw new \InvalidArgumentException("Invalid file type provided: {$result['typeId']}"); } $result['type'] = UNIQUE_TYPES[$result['typeId']];