PHP 8.2 support

This commit is contained in:
Daniil Gentili 2022-11-16 17:17:24 +01:00
parent d7472df075
commit 1412739b5a

View File

@ -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']];