From 9bb07806a0026dedc2615cb48c3dee5cb894d16e Mon Sep 17 00:00:00 2001 From: flashwave Date: Sun, 1 Jan 2023 18:47:24 +0000 Subject: [PATCH] Fixed bitrot issues related to PHP updates. --- VERSION | 2 +- src/Data/MariaDB/MariaDBBackend.php | 4 ++-- src/DateTime.php | 3 ++- src/Serialisation/Base32Serialiser.php | 4 ++-- src/Version.php | 10 ++++++++-- tools/precommit.sh | 2 +- 6 files changed, 16 insertions(+), 9 deletions(-) diff --git a/VERSION b/VERSION index 64d11d4..091cdd7 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.2301.11835 +0.2301.11846 diff --git a/src/Data/MariaDB/MariaDBBackend.php b/src/Data/MariaDB/MariaDBBackend.php index 0c097cb..cbe3501 100644 --- a/src/Data/MariaDB/MariaDBBackend.php +++ b/src/Data/MariaDB/MariaDBBackend.php @@ -1,7 +1,7 @@ 0|[1-9]\d*)\.(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)(?:-(?P(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?P[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$#', $versionString, $matches)) throw new InvalidArgumentException('$versionString is not a valid version string.'); - return new Version($matches['major'], $matches['minor'], $matches['patch'], $matches['prerelease'] ?? '', $matches['build'] ?? ''); + return new Version( + (int)$matches['major'], + (int)$matches['minor'], + (int)$matches['patch'], + $matches['prerelease'] ?? '', + $matches['build'] ?? '' + ); } } diff --git a/tools/precommit.sh b/tools/precommit.sh index fc1e59e..7ddce17 100755 --- a/tools/precommit.sh +++ b/tools/precommit.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash pushd . cd $(dirname "$0")